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

	<parent>
		<groupId>fr.landel</groupId>
		<artifactId>utils</artifactId>
		<version>1.0.14</version>
	</parent>

	<groupId>fr.landel.utils</groupId>
	<artifactId>utils-commons</artifactId>
	<version>1.0.16</version>

	<name>utils-commons</name>
	<description>Common utility classes (cast, enum, integer...)</description>

	<scm>
		<url>https://github.com/Gilandel/${project.artifactId}.git</url>
		<connection>scm:git:git://github.com/Gilandel/${project.artifactId}.git</connection>
		<developerConnection>scm:git:git@github.com:Gilandel/${project.artifactId}.git</developerConnection>
		<tag>1.0.16</tag>
	</scm>

	<issueManagement>
		<system>Github</system>
		<url>http://github.com/Gilandel/${project.artifactId}/issues</url>
	</issueManagement>

	<ciManagement>
		<system>Travis</system>
		<url>https://travis-ci.org/Gilandel/${project.artifactId}</url>
	</ciManagement>

	<properties>
		<gpg.home>${env.HOME}/build/Gilandel/${project.artifactId}/distribution</gpg.home>

		<!-- Java 9 / Javadoc -->
		<javadoc.additionalparam>--add-modules java.xml.bind</javadoc.additionalparam>

		<!-- Dependencies version -->
		<utils-microbenchmark.version>1.0.5</utils-microbenchmark.version>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-perf-sources</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/perf/java</source>
							</sources>
						</configuration>
					</execution>
					<!-- <execution> <id>add-perf-resources</id> <phase>generate-sources</phase> 
						<goals> <goal>add-test-resource</goal> </goals> <configuration> <resources> 
						<resource> <directory>src/perf/resources</directory> </resource> </resources> 
						</configuration> </execution> -->
				</executions>
			</plugin>

			<!-- Add license header and generate third-party text file -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-licenses-header-and-third-party</id>
						<goals>
							<goal>update-file-header</goal>
							<goal>add-third-party</goal>
						</goals>
						<phase>process-sources</phase>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<activation>
				<jdk>[9,)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<additionalparam>${javadoc.additionalparam}</additionalparam>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		
		<profile>
			<id>proguard</id>
			
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.wvengen</groupId>
						<artifactId>proguard-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>process-classes-with-proguard</id>
								<phase>process-classes</phase>
								<goals>
									<goal>proguard</goal>
								</goals>
								<configuration>
									<maxMemory>256m</maxMemory>
									<injar>classes</injar>
									<obfuscate>false</obfuscate>
									<attach>true</attach>
									<!-- <addMavenDescriptor>false</addMavenDescriptor> -->
									<options>
										<option>-optimizationpasses 3</option>
										<option>-overloadaggressively</option>
										<option>-allowaccessmodification</option>
		                				<option>-ignorewarnings</option>
		                				<!-- <option>-dontwarn</option> -->
		                				<option>-keep public class * { public *; }</option>
		                				<option>-keepattributes Signature</option>
									</options>
									<!-- <proguardInclude>${project.basedir}/proguard.conf</proguardInclude> -->
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencies>
		<!-- Commons -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
		</dependency>

		<!-- Jackson -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
		</dependency>

		<!-- Performance testing -->
		<dependency>
			<groupId>fr.landel.utils</groupId>
			<artifactId>utils-microbenchmark</artifactId>
			<version>${utils-microbenchmark.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>