<?xml version="1.0" encoding="UTF-8"?>
<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>se.europeanspallationsource</groupId>
	<artifactId>xaos</artifactId>
	<version>0.4.3</version>
	<packaging>pom</packaging>
	<name>XAOS</name>
	<description>
		A JavaFX application framework made initially to create accelerator
		physics applications based on Open XAL, an open source development
		environment  used for creating accelerator physics applications, scripts
		and services.
	</description>
	<url>https://github.com/ESSICS/XAOS</url>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Claudio Rosati</name>
			<email>claudio.rosati@esss.se</email>
			<organization>European Spallation Source ERIC</organization>
			<organizationUrl>https://europeanspallationsource.se/</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/ESSICS/XAOS.git</connection>
		<developerConnection>scm:git:ssh://github.com/ESSICS/XAOS.git</developerConnection>
		<url>https://github.com/ESSICS/XAOS/tree/master</url>
	</scm>

	<properties>
		<java.release>12</java.release>
		<maven.compiler.source>12</maven.compiler.source>
		<maven.compiler.target>12</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- Auxiliary programs -->
		<!-- - Graphviz: https://www.graphviz.org -->
		<dot.executable>/usr/local/bin/dot</dot.executable>
		<!-- Plugin Dependencies Versions -->
		<asm.version>7.1</asm.version>
		<!-- Dependencies Versions -->
		<assertj.version>3.12.2</assertj.version>
		<junit.version>4.12</junit.version>
	</properties>

	<modules>
		<module>xaos.tools.module</module>
		<!--
			THE FOLLOWING MODULE IS NOT DEPLOYED AND MUST NOT BE THE LAST ONE
			OTHERWISE ALL MODULES WILL NOT BE DEPLOYED (see nexus-staging-maven-plugin
			and how skipNexusStagingDeployMojo works).
		-->
		<module>xaos.tests.tools.module</module>
		<module>xaos.core.module</module>
		<module>xaos.ui.module</module>
		<module>xaos.ui.gauge.module</module>
		<module>xaos.ui.plot.module</module>
		<module>xaos.app.module</module>
		<module>xaos.app.preloader.module</module>
		<module>xaos.demos.module</module>
	</modules>

	<build>
		<plugins>
			<!-- ALPHABETICALLY SORTED BY groupId:artifactId -->
			<plugin>
				<groupId>com.github.ferstl</groupId>
				<artifactId>depgraph-maven-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<createImage>true</createImage>
					<customStyleConfiguration>${project.basedir}/doc/maven-dependencies.json</customStyleConfiguration>
					<dotExecutable>${dot.executable}</dotExecutable>
					<graphFormat>dot</graphFormat>
					<imageFormat>png</imageFormat>
					<includeParentProjects>true</includeParentProjects>
					<outputDirectory>${project.basedir}/doc</outputDirectory>
					<outputFileName>maven-dependencies</outputFileName>
					<reduceEdges>true</reduceEdges>
					<repeatTransitiveDependenciesInTextGraph>true</repeatTransitiveDependenciesInTextGraph>
					<showClassifiers>true</showClassifiers>
					<showConflicts>true</showConflicts>
					<showDuplicates>true</showDuplicates>
					<showGroupIds>true</showGroupIds>
					<showOptional>true</showOptional>
					<showTypes>true</showTypes>
					<showVersions>true</showVersions>
				</configuration>
				<executions>
					<execution>
						<phase>test</phase>
						<id>maven-dependency-graph</id>
						<goals>
							<goal>graph</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.1.0</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<release>${java.release}</release>
					<showDeprecation>true</showDeprecation>
				</configuration>
				<executions>
					<execution>
						<id>default-compile</id>
						<configuration>
						</configuration>
					</execution>
					<execution>
						<id>default-testCompile</id>
						<configuration>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.ow2.asm</groupId>
						<artifactId>asm</artifactId>
						<version>${asm.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.1.1</version>
				<executions>
					<execution>
						<id>dependency-check</id>
						<goals>
							<goal>resolve</goal>
						</goals>
					</execution>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/product/mods</outputDirectory>
							<overWriteIfNewer>true</overWriteIfNewer>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>false</overWriteSnapshots>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0-M2</version>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.6.0</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>3.0.0-M3</version>
				<configuration>
					<argLine>
						--illegal-access=permit
					</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<!-- This is necessary for gpg to not try to use the pinentry programs -->
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.0</version>
				<configuration>
					<additionalOptions>--javafx</additionalOptions>
					<additionalJOptions>
						<additionalJOption>-J-Djavafx.javadoc=true</additionalJOption>
					</additionalJOptions>
					<detectJavaApiLink>false</detectJavaApiLink>
					<detectLinks>false</detectLinks>
					<detectOfflineLinks>true</detectOfflineLinks>
					<docfilessubdirs>true</docfilessubdirs>
					<failOnError>false</failOnError>
					<isOffline>false</isOffline>
					<links>
						<link>https://docs.oracle.com/en/java/javase/${java.release}/docs/api/</link>
						<link>https://openjfx.io/javadoc/${java.release}/</link>
					</links>
					<source>${java.release}</source>
					<tags>
						<tag>
							<name>css.class</name>
							<placement>a</placement>
							<head>CSS Style Class Name:</head>
						</tag>
						<tag>
							<name>def.val</name>
							<placement>a</placement>
							<head>Default Value:</head>
						</tag>
						<tag>
							<name>api.note</name>
							<placement>a</placement>
							<head>API Note:</head>
						</tag>
						<tag>
							<name>impl.note</name>
							<placement>a</placement>
							<head>Implementation Note:</head>
						</tag>
						<tag>
							<name>srvc.order</name>
							<placement>a</placement>
							<head>Service Provider Order:</head>
						</tag>
					</tags>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.ow2.asm</groupId>
						<artifactId>asm</artifactId>
						<version>${asm.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.7.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.1.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-surefire-plugin</artifactId>
				<version>3.0.0-M3</version>
				<configuration>
					<includes>
						<include>**/*Suite.java</include>
					</includes>
					<argLine>
						--illegal-access=permit
					</argLine>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.ow2.asm</groupId>
						<artifactId>asm</artifactId>
						<version>${asm.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.0</version>
				<executions>
					<execution>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
					<execution>
						<id>fixup</id>
						<phase>install</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>${basedir}/bin/fixup.sh</executable>
							<arguments>
								<argument>${project.artifactId}-${project.version}.jar</argument>
								<argument>${dot.executable}</argument>
							</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<generateBackupPoms>false</generateBackupPoms>
				</configuration>
				<executions>
					<execution>
						<phase>validate</phase>
						<id>maven-plugins-version-check</id>
						<goals>
							<goal>display-dependency-updates</goal>
							<goal>display-plugin-updates</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.8</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>verbose.tests</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>3.0.0-M3</version>
						<configuration>
							<systemPropertyVariables>
								<xaos.test.verbose>true</xaos.test.verbose>
							</systemPropertyVariables>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	
<!--
	<repositories>
		<repository>
			<id>central</id>
			<url>http://repo.maven.apache.org/maven2/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>snapshots-repo</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>apache-snapshots-repo</id>
			<url>http://repository.apache.org/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
-->

	<dependencies>

		<!-- Unit Test  - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>${assertj.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

</project>
