<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.actiontestscript</groupId>
	<artifactId>ats-geoip-data</artifactId>
	<version>1.3.2</version>

	<packaging>jar</packaging>

	<name>ats-geoip-data</name>
	<description>GeoIP database and utilities for ActionTestScript</description>
	<url>https://gitlab.com/actiontestscript/ats-geoip-data</url>
	<inceptionYear>2024</inceptionYear>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>pierrehub2b</id>
			<name>Pierre Huber</name>
			<email>pierrehuber@yahoo.fr</email>
			<organization>ActionTestScript</organization>
			<organizationUrl>https://actiontestscript.org</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>Europe/Paris</timezone>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://gitlab.com/actiontestscript/ats-geoip-data.git</connection>
		<developerConnection>scm:git:https://gitlab.com/actiontestscript/ats-geoip-data.git</developerConnection>
		<url>https://gitlab.com/actiontestscript/ats-geoip-data</url>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>central</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>central</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>21</java.version>
		<maven.compiler.target>21</maven.compiler.target>
		<maven.compiler.release>21</maven.compiler.release>
		<lib.geoip2.version>5.0.2</lib.geoip2.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.maxmind.geoip2</groupId>
			<artifactId>geoip2</artifactId>
			<version>${lib.geoip2.version}</version>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>update-geoip-database</id>
						<phase>initialize</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>${executable.shell}</executable>
							<commandlineArgs>${executable.arg} ${project.basedir}/${geoip.script}</commandlineArgs>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<archive>
						<manifest>
							<packageName>com.ats.tools</packageName>
						</manifest>
						<manifestEntries>
							<Created-By>actiontestscript team</Created-By>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<configuration>
					<release>${java.version}</release>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.5.0</version>
				<configuration>
					<source>8</source>
					<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>0.8.0</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>central</publishingServerId>
					<autoPublish>true</autoPublish>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>windows</id>
			<activation>
				<os><family>windows</family></os>
			</activation>
			<properties>
				<executable.shell>powershell</executable.shell>
				<executable.arg>-ExecutionPolicy Bypass -File</executable.arg>
				<geoip.script>update_geoip.ps1</geoip.script>
			</properties>
		</profile>
		<profile>
			<id>unix</id>
			<activation>
				<os><family>unix</family></os>
			</activation>
			<properties>
				<executable.shell>sh</executable.shell>
				<executable.arg></executable.arg>
				<geoip.script>update_geoip.sh</geoip.script>
			</properties>
		</profile>
	</profiles>
</project>
