<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>

	<parent>
		<groupId>com.github.crawler-commons</groupId>
		<artifactId>urlfrontier</artifactId>
		<version>1.2</version>
	</parent>

	<name>urlfrontier-service</name>
	<artifactId>urlfrontier-service</artifactId>
	<packaging>jar</packaging>

	<description>Implementation of the URLFrontier Service</description>

	<properties>
		<prometheus.version>0.14.1</prometheus.version>
        <!-- needed to build within Docker -->
		<skipFormatCode>false</skipFormatCode>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>com.cosium.code</groupId>
				<artifactId>git-code-format-maven-plugin</artifactId>
				<version>2.7</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>
				<configuration>
					<skip>${skipFormatCode}</skip>
					<googleJavaFormatOptions>
						<aosp>true</aosp>
						<fixImportsOnly>false</fixImportsOnly>
						<skipSortingImports>false</skipSortingImports>
						<skipRemovingUnusedImports>false</skipRemovingUnusedImports>
					</googleJavaFormatOptions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.2.4</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>crawlercommons.urlfrontier.service.URLFrontierServer</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>info.picocli</groupId>
			<artifactId>picocli</artifactId>
			<version>4.6.3</version>
		</dependency>

		<dependency>
			<groupId>com.github.crawler-commons</groupId>
			<artifactId>urlfrontier-API</artifactId>
			<version>${project.version}</version>
		</dependency>

		<!-- native implementation of slf4j -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.10</version>
		</dependency>

		<dependency>
			<groupId>io.prometheus</groupId>
			<artifactId>simpleclient</artifactId>
			<version>${prometheus.version}</version>
		</dependency>

		<!-- Hotspot JVM metrics-->
		<dependency>
			<groupId>io.prometheus</groupId>
			<artifactId>simpleclient_hotspot</artifactId>
			<version>${prometheus.version}</version>
		</dependency>

		<!-- Exposition HTTPServer-->
		<dependency>
			<groupId>io.prometheus</groupId>
			<artifactId>simpleclient_httpserver</artifactId>
			<version>${prometheus.version}</version>
		</dependency>

		<dependency>
			<groupId>org.rocksdb</groupId>
			<artifactId>rocksdbjni</artifactId>
			<version>6.27.3</version>
		</dependency>

	</dependencies>


</project>
