<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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.github.crawler-commons</groupId>
	<artifactId>urlfrontier</artifactId>
	<packaging>pom</packaging>
	<version>2.5</version>
	<name>urlfrontier</name>

	<url>https://github.com/crawler-commons/url-frontier</url>

	<description>API definition, resources and reference implementation of URL
		Frontiers</description>

	<inceptionYear>2020</inceptionYear>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/crawler-commons/url-frontier</url>
		<connection>scm:git:git://github.com/crawler-commons/url-frontier.git</connection>
		<developerConnection>
			scm:git:git@github.com:crawler-commons/url-frontier.git</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>central-sonatype-snapshots</id>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
		</snapshotRepository>
	</distributionManagement>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/crawler-commons/url-frontier/issues</url>
	</issueManagement>

	<mailingLists>
		<mailingList>
			<name>Project Mailing List</name>
			<post>crawler-commons [at] googlegroups [dot] com</post>
		</mailingList>
	</mailingLists>

	<organization>
		<name>Crawler-Commons</name>
		<url>http://github.com/crawler-commons</url>
	</organization>

	<developers>
		<developer>
			<name>Julien Nioche</name>
			<email>julien@digitalpebble.com</email>
			<organization>DigitalPebble</organization>
			<organizationUrl>http://www.digitalpebble.com</organizationUrl>
		</developer>
		<developer>
			<name>Laurent Klock</name>
			<email>Laurent.Klock@arhs-cube.com</email>
			<organization>ARHS Group</organization>
			<organizationUrl>https://www.arhs-group.com</organizationUrl>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- needed to build within Docker -->
		<skipFormatCode>false</skipFormatCode>
		<version.maven-enforcer-plugin>3.5.0</version.maven-enforcer-plugin>
		<minimalMavenBuildVersion>3.6.3</minimalMavenBuildVersion>
		<version.maven-compiler-plugin>3.13.0</version.maven-compiler-plugin>
		<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
		<version.maven-gpg-plugin>3.2.8</version.maven-gpg-plugin>
		<version.maven-source-plugin>3.3.1</version.maven-source-plugin>
		<version.maven-jar-plugin>3.4.2</version.maven-jar-plugin>
		<version.maven-javadoc-plugin>3.12.0</version.maven-javadoc-plugin>
		<version.maven-release-plugin>3.1.1</version.maven-release-plugin>
		<version.maven-shade-plugin>3.6.1</version.maven-shade-plugin>
		<minimalJavaBuildVersion>11</minimalJavaBuildVersion>
        <picocli.version>4.7.6</picocli.version>
        <junit.version>5.11.0</junit.version>
        <protobuf.version>3.25.8</protobuf.version>
        <central-publishing-plugin.version>0.9.0</central-publishing-plugin.version>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${version.maven-compiler-plugin}</version>
					<configuration>
						<release>11</release>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${version.maven-release-plugin}</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>${version.maven-enforcer-plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${version.maven-gpg-plugin}</version>
					<configuration>
						<gpgArguments>
							<arg>--digest-algo=SHA512</arg>
						</gpgArguments>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${version.maven-source-plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${version.maven-jar-plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${version.maven-javadoc-plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>${version.maven-shade-plugin}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>com.cosium.code</groupId>
				<artifactId>git-code-format-maven-plugin</artifactId>
				<version>${git-code-format-maven-plugin.version}</version>
				<executions>
					<!-- On commit, format the modified java files -->
					<execution>
						<id>install-formatter-hook</id>
						<goals>
							<goal>install-hooks</goal>
						</goals>
					</execution>
					<!-- On Maven verify phase, fail if any file (including
					unmodified) 
						is badly formatted -->
					<execution>
						<id>validate-code-format</id>
						<goals>
							<goal>validate-code-format</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<!-- Enable https://github.com/google/google-java-format -->
					<dependency>
						<groupId>com.cosium.code</groupId>
						<artifactId>google-java-format</artifactId>
						<version>${git-code-format-maven-plugin.version}</version>
					</dependency>
				</dependencies>
				<configuration>
					<skip>${skipFormatCode}</skip>
					<formatterOptions>
						<googleJavaFormat.aosp>true</googleJavaFormat.aosp>
						<googleJavaFormat.fixImportsOnly>false</googleJavaFormat.fixImportsOnly>
						<googleJavaFormat.skipSortingImports>false</googleJavaFormat.skipSortingImports>
						<googleJavaFormat.skipRemovingUnusedImports>false</googleJavaFormat.skipRemovingUnusedImports>
					</formatterOptions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-maven-version</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>${minimalMavenBuildVersion}</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
					<execution>
						<id>enforce-java-version</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>${minimalJavaBuildVersion}</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<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-jar-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-test</id>
								<goals>
									<goal>test-jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<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>${central-publishing-plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<deploymentName>Crawler-Commons URLFrontier ${project.version}</deploymentName>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>


	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>

		<dependency>
			<groupId>info.picocli</groupId>
			<artifactId>picocli</artifactId>
			<version>${picocli.version}</version>
		</dependency>

		</dependencies>
	</dependencyManagement>

	<modules>
		<module>API</module>
		<module>service</module>
		<module>client</module>
		<module>tests</module>
	</modules>

</project>
