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

	<!-- General info -->
	<url>http://www.dna-evolutions.com/</url>
	<groupId>jopt</groupId>
	<version>${jopt.version.number}${jopt.version.postfix}</version>
	<artifactId>jopt.core</artifactId>
	<name>JOpt Java Core</name>
	<inceptionYear>2017</inceptionYear>
	<description>Core lib for JOpt core.</description>
	<packaging>jar</packaging>


	<developers>
		<developer>
			<id>jens@dnaevolutions</id>
			<name>Jens Richter</name>
			<email>jens.richter@dna-evolutions.com</email>
		</developer>
	</developers>


	<organization>
		<name>DNA Evolutions GmbH</name>
		<url>http://www.dna-evolutions.com/</url>
	</organization>


	<licenses>
		<license>
			<name>Custom DNA evolutions license</name>
			<url>https://www.dna-evolutions.com</url>
		</license>
	</licenses>


	<properties>

		<!-- Default is snapshot -->
		<jopt.version.postfix>-SNAPSHOT</jopt.version.postfix>

		<java.version.source>17</java.version.source>
		<java.version.target>17</java.version.target>

		<jopt.version.number>7.5.3-rc7-j${java.version.target}</jopt.version.number>


		<maven.compiler.source>${java.version.source}</maven.compiler.source>
		<maven.compiler.target>${java.version.target}</maven.compiler.target>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<build.time.utc>${maven.build.timestamp}</build.time.utc>

		<!-- ============================= Dependency versions ============================= -->

		<!-- DLL: For dll usage, we have to use 31.0.1-jre, For >33.4.0-jre we need to explicitly add javax.annotations deps -->
		<guava.version>33.7.2-jre</guava.version>
		<errorprone.version>2.47.0</errorprone.version> 
		<spotbugs.version>4.9.8</spotbugs.version> 
		
		
		<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version> <!-- DLL: 2.0 For dll build -->
		<log4j-core.version>2.25.5</log4j-core.version> <!-- DLL: For dll usage, we have to include it! So NO provided scope -->
		
		
		<!-- Spring related -->
		<spring-data-mongodb.version>4.5.8</spring-data-mongodb.version> <!-- For 4.0.0 we have to target at least JDK 17 -->
		<swagger-annotations.version>2.2.42</swagger-annotations.version>
		<bson.version>5.6.1</bson.version>  <!--This is mandatorily defined by spring-boot version where the jar will 
			be integrated -->


		<!-- Version that break in Java 8 when upgraded -->
		
		<testng.version>7.12.0</testng.version> <!-- For >= 7.7.0 we have to target at least JDK 11 -->

		<!-- Version that break in Java 8 when upgraded END -->

		<value.version>2.12.1</value.version>
		
		
		<jackson-default.version>2.21.8</jackson-default.version>
		
		<jackson-databind.version>${jackson-default.version}</jackson-databind.version>
		<jackson-datatype-guava.version>${jackson-default.version}</jackson-datatype-guava.version>
		<jackson-module-parameter-names.version>${jackson-default.version}</jackson-module-parameter-names.version>
		<jackson-datatype-jdk8.version>${jackson-default.version}</jackson-datatype-jdk8.version>
		<jackson-datatype-jsr310.version>${jackson-default.version}</jackson-datatype-jsr310.version>

		<rxjava.version>3.1.12</rxjava.version>
		


		<unit-api.version>2.2</unit-api.version>  <!-- Newer version (> 2.1) leads to missing class during parsing -->
		<unit-indriya.version>2.2.3</unit-indriya.version>

		<commons-math3.version>3.6.1</commons-math3.version>
		<commons-lang3.version>3.20.0</commons-lang3.version>
		<commons-compress.version>1.28.0</commons-compress.version>

		<!-- For tests -->

		<hamcrest.version>3.0</hamcrest.version>

		<javafaker.version>1.0.2</javafaker.version>
		<datafactory.version>0.8</datafactory.version>

		<!-- During build -->
		<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
		<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>

		<proguard-maven-plugin.version>2.6.0</proguard-maven-plugin.version>

		<!-- Pro guard - By default base version 7.2.2 is used by proguard-maven. 
			We use the up to java21 compatible core version 9.1.0+ -->
		<proguard.base.version>7.8.2</proguard.base.version>
		<proguard.core.version>9.3.0</proguard.core.version>


		<!--  
		<wagon-maven-plugin.version>2.0.2</wagon-maven-plugin.version>
		<wagon-ftp.version>3.5.3</wagon-ftp.version>
		<wagon-ssh.version>3.5.3</wagon-ssh.version>-->


		<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
		<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>

		<properties-maven-plugin.version>1.1.0</properties-maven-plugin.version>
		<jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>

		<license-maven-plugin.version>2.0.0</license-maven-plugin.version> <!--Newer version needs refactoring of third party output -->
		<maven-shade-plugin.version>3.5.1</maven-shade-plugin.version>

		<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>

		


		<!-- Temp -->

		<poi-ooxml.version>5.5.1</poi-ooxml.version>
		<poi.version>5.5.1</poi.version>

		<jts-core.version>1.20.0</jts-core.version>

		<!-- Temp END -->

		<!-- ===================== Dependency versions End ============================= -->


		<!-- New Nexus endpoints (server clones) -->
		<dna.nexus.maven.endpoint.new>https://private-nexus.dna-evolutions.net </dna.nexus.maven.endpoint.new>
		<dna.nexus.maven.obfuscated.endpoint.new>https://nexus.dna-evolutions.net</dna.nexus.maven.obfuscated.endpoint.new>

		<!-- Private (new) -->
		<dna.nexus.maven.public.new>${dna.nexus.maven.endpoint.new}/repository/maven-public/</dna.nexus.maven.public.new>
		<dna.nexus.maven.releases.new>${dna.nexus.maven.endpoint.new}/repository/maven-releases/</dna.nexus.maven.releases.new>
		<dna.nexus.maven.snapshots.new>${dna.nexus.maven.endpoint.new}/repository/maven-snapshots/</dna.nexus.maven.snapshots.new>

		<!-- Public/obfuscated (new) -->
		<dna.nexus.maven.obfuscated.new>${dna.nexus.maven.obfuscated.endpoint.new}/repository/maven-public/</dna.nexus.maven.obfuscated.new>
		<dna.nexus.maven.obfuscated.releases.new>${dna.nexus.maven.obfuscated.endpoint.new}/repository/maven-releases/</dna.nexus.maven.obfuscated.releases.new>
		<dna.nexus.maven.obfuscated.snapshots.new>${dna.nexus.maven.obfuscated.endpoint.new}/repository/maven-snapshots/</dna.nexus.maven.obfuscated.snapshots.new>

		<dna.ftp.javadoc.endpoint>ftp://public.javadoc.dna-evolutions.com</dna.ftp.javadoc.endpoint>
		<dna.ssh.javadoc.endpoint>scp://public.javadoc.dna-evolutions.com</dna.ssh.javadoc.endpoint>
	</properties>


	<!-- ===== Repositories & Distribution ===== -->
	<!-- Dependencies and plugins come from Maven Central; the deploy targets are in the maven-deploy-plugin executions -->
	<distributionManagement>
		<site>
			<id>public-javadoc-ftp-server</id>
			<url>${dna.ftp.javadoc.endpoint}</url>
		</site>
	</distributionManagement>

	<!-- ===== Dependency Management ===== -->

	<!-- MANAGMENT -->
	<dependencyManagement>
		<dependencies>
		
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>
			
			<!-- After guava update we need to provide the javax.annotation explicitly. 
					In future version should be replaced by jakarta -->
			
				<!-- Error Prone annotations: CanIgnoreReturnValue, Var -->
				<dependency>
					<groupId>com.google.errorprone</groupId>
					<artifactId>error_prone_annotations</artifactId>
					<version>${errorprone.version}</version>
				</dependency>
			
				<dependency>
					<groupId>com.github.spotbugs</groupId>
					<artifactId>spotbugs-annotations</artifactId>
					<version>${spotbugs.version}</version>
				</dependency>
			<!-- End guava hack -->

			<dependency>
				<groupId>org.immutables</groupId>
				<artifactId>value</artifactId>
				<version>${value.version}</version>
			</dependency>

			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson-databind.version}</version>
			</dependency>

			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-guava</artifactId>
				<version>${jackson-datatype-guava.version}</version>
			</dependency>

			<dependency>
				<groupId>com.fasterxml.jackson.module</groupId>
				<artifactId>jackson-module-parameter-names</artifactId>
				<version>${jackson-module-parameter-names.version}</version>
			</dependency>

			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-jdk8</artifactId>
				<version>${jackson-datatype-jdk8.version}</version>
			</dependency>

			<!-- Provides for example Duration DurationDeserializer -->
			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-jsr310</artifactId>
				<version>${jackson-datatype-jsr310.version}</version>
			</dependency>

			<dependency>
				<groupId>io.reactivex.rxjava3</groupId>
				<artifactId>rxjava</artifactId>
				<version>${rxjava.version}</version>
			</dependency>

			<dependency>
				<groupId>javax.measure</groupId>
				<artifactId>unit-api</artifactId>
				<version>${unit-api.version}</version>
			</dependency>

			<dependency>
				<groupId>tech.units</groupId>
				<artifactId>indriya</artifactId>
				<version>${unit-indriya.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>${log4j-core.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-math3</artifactId>
				<version>${commons-math3.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${commons-lang3.version}</version>
			</dependency>

			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-compress</artifactId>
				<version>${commons-compress.version}</version>
			</dependency>

			<dependency>
				<groupId>org.mongodb</groupId>
				<artifactId>bson</artifactId>
				<version>${bson.version}</version>
				<scope>provided</scope>
			</dependency>

			<dependency>
				<groupId>org.testng</groupId>
				<artifactId>testng</artifactId>
				<version>${testng.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- ===== Dependencies ===== -->
	<dependencies>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>

		<!-- After guava update we need to provide the javax.annotation explicitly. In future version should be replaced by jakarta -->
	
			<!-- Error Prone annotations: CanIgnoreReturnValue, Var -->
			<dependency>
				<groupId>com.google.errorprone</groupId>
				<artifactId>error_prone_annotations</artifactId>
				<scope>compile</scope>
			</dependency>
			
			<dependency>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-annotations</artifactId>
				<scope>compile</scope>
			</dependency>
		<!-- End guava hack -->

		<dependency>
			<groupId>org.immutables</groupId>
			<artifactId>value</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-guava</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.module</groupId>
			<artifactId>jackson-module-parameter-names</artifactId>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-jdk8</artifactId>
		</dependency>

		<!-- Provides for example Duration DurationDeserializer -->
		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-jsr310</artifactId>
		</dependency>

		<dependency>
			<groupId>io.reactivex.rxjava3</groupId>
			<artifactId>rxjava</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.measure</groupId>
			<artifactId>unit-api</artifactId>
		</dependency>

		<dependency>
			<groupId>tech.units</groupId>
			<artifactId>indriya</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<!--<scope>provided</scope> --> <!-- For dll usage, we have to include it! So NO provided scope -->
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-math3</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-compress</artifactId>
		</dependency>

		<dependency>
			<groupId>org.mongodb</groupId>
			<artifactId>bson</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- PROVIDED -->
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-annotations</artifactId>
			<version>${swagger-annotations.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-mongodb</artifactId>
			<version>${spring-data-mongodb.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.locationtech.jts</groupId>
			<artifactId>jts-core</artifactId>
			<version>${jts-core.version}</version>
		</dependency>

		<!-- for excel -->
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>${poi.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-ooxml</artifactId>
			<version>${poi-ooxml.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<version>${hamcrest.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.github.javafaker</groupId>
			<artifactId>javafaker</artifactId>
			<version>${javafaker.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.fluttercode.datafactory</groupId>
			<artifactId>datafactory</artifactId>
			<version>${datafactory.version}</version>
			<scope>test</scope>
		</dependency>
		
	</dependencies>





	<!-- MANAGMENT DONE -->


	<profiles>
		<profile>
			<id>snapshot</id>
			<activation>
				<!-- this profile is active by default -->
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<maven.test.skip>false</maven.test.skip>
				<jopt.version.postfix>-SNAPSHOT</jopt.version.postfix>
			</properties>

			<build>
				<plugins>

					<!-- JavaDoc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>

						<configuration>
							<appendAssemblyId>true</appendAssemblyId>

							<tags>
								<tag>
									<name>category</name>
									<placement>a</placement>
									<head>Category:</head>
								</tag>
							</tags>
						</configuration>

						<executions>
							<execution>
								<id>attach-all-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<destDir>target/full-apidocs</destDir>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<version>${maven-deploy-plugin.version}</version>
						<executions>
							<!-- A snapshot goes to the new private Nexus only: the project artifacts through deploy-to-new,
								the obfuscated jar through deploy-lib-new. The default deploy is skipped: distributionManagement
								names no repository. -->
							<execution>
								<id>default-deploy</id>
								<configuration>
									<skip>true</skip>
								</configuration>
							</execution>

								<execution>
																<id>deploy-lib-new</id>
																<phase>deploy</phase>
																<goals>
																	<goal>deploy-file</goal>
																</goals>
																<configuration>
																	<repositoryId>jopt4-maven-new</repositoryId>
																	<artifactId>jopt.core.pg</artifactId>
																	<packaging>jar</packaging>
																	<classifier>pg</classifier>
								
																	<version>${project.version}</version>
																	<groupId>jopt</groupId>
								
																	<file>target/${project.build.finalName}-with-dep-pg.jar</file>
																	<pomFile>pom.xml</pomFile>
																	<url>${dna.nexus.maven.snapshots.new}</url>
																</configuration>
															</execution>
						</executions>
					</plugin>

					<!-- ProGuard: reference managed execution -->
					<plugin>
						<groupId>com.github.wvengen</groupId>
						<artifactId>proguard-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>obfuscate-with-resources</id>
							</execution>
						</executions>
					</plugin>

					<!-- Done -->

				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>

			<properties>
				<!-- We create releases based on snapshot, so additional testing is not 
					required -->
				<maven.test.skip>true</maven.test.skip>
				<!-- No postfix -->
				<jopt.version.postfix></jopt.version.postfix>
			</properties>

			<build>
				<plugins>
					<!-- Deploy public lib and public javadoc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<version>${maven-deploy-plugin.version}</version>
						<executions>
							<!-- A release goes to the new hosts only: the project artifacts through deploy-to-new to the new
								private Nexus, the obfuscated jar through deploy-lib-new to the new public Nexus. The default
								deploy is skipped: distributionManagement names no repository. -->
							<execution>
								<id>default-deploy</id>
								<configuration>
									<skip>true</skip>
								</configuration>
							</execution>

								<execution>
																<id>deploy-lib-new</id>
																<phase>deploy</phase>
																<goals>
																	<goal>deploy-file</goal>
																</goals>
																<configuration>
																	<repositoryId>jopt4-maven-ob-new</repositoryId>
																	<artifactId>jopt.core.pg</artifactId>
																	<packaging>jar</packaging>
																	<classifier>shaded</classifier>
								
																	<version>${project.version}</version>
																	<groupId>jopt</groupId>
								
																	<file>target/${project.build.finalName}-with-dep-pg.jar</file>
																	<pomFile>pom.xml</pomFile>
																	<javadoc>target/${project.build.finalName}-public-javadocs.jar</javadoc>
																	<url>${dna.nexus.maven.obfuscated.releases.new}</url>
																</configuration>
															</execution>
						</executions>
					</plugin>
					<!-- ProGuard: reference managed execution -->
					<plugin>
						<groupId>com.github.wvengen</groupId>
						<artifactId>proguard-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>obfuscate-with-resources</id>
							</execution>
						</executions>
					</plugin>

					<!-- JavaDoc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>

						<configuration>
							<appendAssemblyId>true</appendAssemblyId>

							<tags>
								<tag>
									<name>category</name>
									<placement>a</placement>
									<head>Category:</head>
								</tag>
							</tags>
						</configuration>

						<executions>
							<execution>
								<id>attach-all-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<destDir>target/full-apidocs</destDir>
								</configuration>
							</execution>

							<execution>
								<id>attach-public-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<destDir>target/public-apidocs</destDir>
									<classifier>public-javadocs</classifier>
									<excludePackageNames>
										com.dna.jopt.assessment.costadjustment:
										com.dna.jopt.assessment.costadjustment.*:

										com.dna.jopt.assessment.costassessor:
										com.dna.jopt.assessment.costassessor.*:

										com.dna.jopt.assessment.costassessorrestriction:
										com.dna.jopt.assessment.costassessorrestriction.*:

										com.dna.jopt.config:
										com.dna.jopt.config.*:

										com.dna.jopt.framework.analyze:
										com.dna.jopt.framework.analyze.*:

										com.dna.jopt.framework.body.setup:
										com.dna.jopt.framework.body.setup.*:

										com.dna.jopt.framework.firstentitycreation:
										com.dna.jopt.framework.firstentitycreation.*:

										com.dna.jopt.framework.inputplausibility:
										com.dna.jopt.framework.inputplausibility.*:

										com.dna.jopt.framework.lic:
										com.dna.jopt.framework.lic.*:

										com.dna.jopt.framework.licensing:
										com.dna.jopt.framework.licensing.*:

										com.dna.jopt.framework.picker:
										com.dna.jopt.framework.picker.*:

										com.dna.jopt.revision:
										com.dna.jopt.revision.*:

										com.dna.jopt.util.cluster:
										com.dna.jopt.util.cluster.*:

										com.dna.jopt.util.entityhealth:
										com.dna.jopt.util.entityhealth.*:

										com.dna.jopt.util.hotspot:
										com.dna.jopt.util.hotspot.*:

										com.dna.jopt.util.optimizationresultanalyzer:
										com.dna.jopt.util.optimizationresultanalyzer.*:

										com.dna.jopt.util.optimizationresultmodifier:
										com.dna.jopt.util.optimizationresultmodifier.*:

										com.dna.jopt.util.route:
										com.dna.jopt.util.route.*:

										com.dna.jopt.util.spawn:
										com.dna.jopt.util.spawn.*

									</excludePackageNames>

								</configuration>
							</execution>
						</executions>
					</plugin>


				</plugins>
			</build>
		</profile>
	</profiles>

	<build>

		<!-- <extensions>
		 
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ftp</artifactId>
				<version>${wagon-ftp.version}</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>${wagon-ssh.version}</version>
			</extension>
		</extensions>-->

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<!-- <version>2.0</version> --> <!-- For dll build -->
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven-deploy-plugin.version}</version>
				<executions>
					<!-- Deploy the project artifacts to the new private Nexus (both profiles skip the default deploy) -->
					<execution>
						<id>deploy-to-new</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
						<configuration>
							<altDeploymentRepository>jopt4-maven-new::default::${dna.nexus.maven.releases.new}</altDeploymentRepository>
							<altSnapshotDeploymentRepository>jopt4-maven-new::default::${dna.nexus.maven.snapshots.new}</altSnapshotDeploymentRepository>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>${maven-shade-plugin.version}</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>

							<finalName>${project.build.finalName}-with-dep</finalName>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer" />
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
									<resource>LICENSE.txt</resource>
									<file>src/license/dna_license/license.txt</file>
								</transformer>
							</transformers>
							<minimizeJar>true</minimizeJar>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<filters>
								<filter>
									<artifact>com.google.guava:guava</artifact>
									<includes>
										<include>com/google/common/**</include>
									</includes>
								</filter>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
										<exclude>META-INF/maven/**</exclude>
										<exclude>META-INF/gradle/**</exclude>
										<exclude>META-INF/proguard/**</exclude>
										<exclude>META-INF/NOTICE</exclude>
										<exclude>META-INF/LICENSE</exclude>
										<exclude>META-INF/LICENSE.txt</exclude>
										<exclude>META-INF/NOTICE.txt</exclude>
									</excludes>
								</filter>
								<filter>
									<!-- Exclude log4j2.xml from the shaded jar. -->
									<artifact>*:*</artifact>
									<excludes>
										<exclude>log4j2.xml</exclude>
									</excludes>
								</filter>
							</filters>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>${license-maven-plugin.version}</version>

				<configuration>
					<licenseName>dna_license</licenseName>
					<licenseResolver>${project.baseUri}/src/license</licenseResolver>
				</configuration>

				<executions>
					<execution>
						<id>with-single-string-included-licenses</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>add-third-party</goal>
						</goals>
						<configuration>
							<excludedScopes>test</excludedScopes>
							<thirdPartyFilename>THIRD-PARTY-LICENSE.txt</thirdPartyFilename>
						</configuration>
					</execution>
					<execution>
						<id>first</id>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>process-sources</phase>
						<configuration>
							<excludes>
								<exclude>**/*.json</exclude>
								<exclude>**/*.jli</exclude>
								<exclude>**/*.dli</exclude>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<configuration>
				</configuration>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<configuration>
					<suiteXmlFiles>
						<suiteXmlFile>testng.xml</suiteXmlFile>
					</suiteXmlFiles>
				</configuration>
			</plugin>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>${git-commit-id-plugin.version}</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<dateFormat>yyyyMMdd-HHmmss</dateFormat>
					<dateFormatTimeZone>Etc/UTC</dateFormatTimeZone>
					<dotGitDirectory>${project.basedir}/../.git</dotGitDirectory>
					<generateGitPropertiesFile>false</generateGitPropertiesFile>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>${properties-maven-plugin.version}</version>
				<executions>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>write-project-properties</goal>
						</goals>
						<configuration>
							<outputFile>${project.build.outputDirectory}/buildinfo/joptcorebuildinfo.properties</outputFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco-maven-plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>


		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.github.wvengen</groupId>
					<artifactId>proguard-maven-plugin</artifactId>
					<version>${proguard-maven-plugin.version}</version>
					<executions>
						<execution>
							<id>obfuscate-with-resources</id>
							<phase>package</phase>
							<goals>
								<goal>proguard</goal>
							</goals>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>com.guardsquare</groupId>
							<artifactId>proguard-core</artifactId>
							<version>${proguard.core.version}</version>
							<scope>runtime</scope>
						</dependency>
						<dependency>
							<groupId>com.guardsquare</groupId>
							<artifactId>proguard-base</artifactId>
							<version>${proguard.base.version}</version>
						</dependency>
					</dependencies>
					<configuration>
						<obfuscate>true</obfuscate>
						<injar>${project.build.finalName}-with-dep.jar</injar>
						<outjar>${project.build.finalName}-with-dep-pg.jar</outjar>
						<includeDependency>true</includeDependency>
						<exclusions>

							<!-- exclude the artifact -->
							<exclusion>
								<groupId>org.apache.logging.log4j</groupId>
								<artifactId>log4j-core</artifactId>
							</exclusion>

							<exclusion>
								<groupId>org.bson</groupId>
								<artifactId>bson</artifactId>
							</exclusion>

						</exclusions>
						<inclusions>

							<inclusion>
								<groupId>com.google.guava</groupId>
								<artifactId>guava</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>org.immutables</groupId>
								<artifactId>value</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>com.fasterxml.jackson.core</groupId>
								<artifactId>jackson-databind</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>com.fasterxml.jackson.datatype</groupId>
								<artifactId>jackson-datatype-guava</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>com.fasterxml.jackson.module</groupId>
								<artifactId>jackson-module-parameter-names</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>com.fasterxml.jackson.datatype</groupId>
								<artifactId>jackson-datatype-jdk8</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>com.fasterxml.jackson.datatype</groupId>
								<artifactId>jackson-datatype-jsr310</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>io.reactivex.rxjava3</groupId>
								<artifactId>rxjava</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>javax.measure</groupId>
								<artifactId>unit-api</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>tech.units</groupId>
								<artifactId>indriya</artifactId>
								<library>true</library>
							</inclusion>

							<!-- <inclusion> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> 
								<library>true</library> </inclusion> -->

							<inclusion>
								<groupId>org.apache.commons</groupId>
								<artifactId>commons-math3</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>org.apache.commons</groupId>
								<artifactId>commons-lang3</artifactId>
								<library>true</library>
							</inclusion>

							<inclusion>
								<groupId>org.apache.commons</groupId>
								<artifactId>commons-compress</artifactId>
								<library>true</library>
							</inclusion>

						</inclusions>

						<proguardInclude>${project.basedir}/src/proguard/proguard-rules.pro</proguardInclude>


						<libs>
							<lib>${java.home}/jmods/</lib>
						</libs>
						<archive>
							<manifest>
								<mainClass>Main</mainClass>
								<packageName>jopt.rapot.core</packageName>
							</manifest>
						</archive>

					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>
</project>
