<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>com.iamsoft</groupId>
	<artifactId>iamsoft-fxutils-examples</artifactId>
	<version>8.0.1</version>
	<packaging>jar</packaging>
	<name>${project.groupId}:${project.artifactId}</name>
	<description>Sample usage of iamsoft-fxutils classes</description>
	<url>https://www.iamsoft.com</url>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>CW</name>
			<email>cw720@proton.me</email>
			<organization>Iamsoft</organization>
			<organizationUrl>http://www.iamsoft.com</organizationUrl>
		</developer>
	</developers>
	<scm>
		<url>https://bitbucket.org/iamsoft/apextoolbox</url>
	</scm>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<repoUrl>s3://iamsoft.com</repoUrl>
	</properties>

	<repositories>
		<repository>
			<id>iamsoft-repo</id>
			<url>s3://iamsoft.com/maven-private/</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>com.iamsoft</groupId>
			<artifactId>iamsoft-fxutils</artifactId>
			<version>8.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.controlsfx</groupId>
			<artifactId>fxsampler</artifactId>
			<version>1.0.10</version><!-- upgrade breaks build -->
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<configLocation>../checkstyle_rules.xml</configLocation>
					<suppressionsLocation>config/checkstyle/suppressions.xml</suppressionsLocation>
					<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>9.3</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<configuration>
							<failsOnError>false</failsOnError>
							<failOnViolation>true</failOnViolation>
							<violationSeverity>error</violationSeverity>
							<logViolationsToConsole>true</logViolationsToConsole>
						</configuration>
						<phase>compile</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>attach-artifacts</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>target/media/fxutilsexamples-${project.version}.exe</file>
									<type>exe</type>
								</artifact>
								<artifact>
									<file>target/media/fxutilsexamples-${project.version}.dmg</file>
									<type>dmg</type>
								</artifact>
								<artifact>
									<file>target/media/fxutilsexamples-${project.version}.sh</file>
									<type>sh</type>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.3.0</version>
				<configuration>
					<descriptors>
						<descriptor>fat-jar-assembly.xml</descriptor>
					</descriptors>
					<archive>
						<manifest>
							<mainClass>com.iamsoft.util.ui.javafx.example.FXUtilsSampler</mainClass>
						</manifest>
					</archive>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0</version>
			</plugin>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M7</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>initialize</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<includeScope>runtime</includeScope>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.sonatype.install4j</groupId>
				<artifactId>install4j-maven-plugin</artifactId>
				<version>1.1.2</version>
				<executions>
					<execution>
						<id>compile-installers</id>
						<phase>package</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<installDir>${install4j.home}</installDir>
							<projectFile>${project.basedir}/installer.install4j</projectFile>
							<macKeystorePassword>${keystorePassword}</macKeystorePassword>
							<winKeystorePassword>${keystorePassword}</winKeystorePassword>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<extensions>
			<extension>
				<groupId>com.github.seahen</groupId>
				<artifactId>maven-s3-wagon</artifactId>
				<version>1.3.3</version>
			</extension>
		</extensions>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.3.1</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<configLocation>../checkstyle_rules.xml</configLocation>
					<failsOnError>true</failsOnError>
					<failOnViolation>true</failOnViolation>
					<violationSeverity>error</violationSeverity>
					<logViolationsToConsole>true</logViolationsToConsole>
				</configuration>
				<reportSets>
					<reportSet>
						<reports>
							<report>checkstyle</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M7</version>
			</plugin>

			<plugin>
				<artifactId>maven-clover-plugin</artifactId>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>mac</id>
			<activation>
				<os>
					<family>mac</family>
				</os>
			</activation>
			<properties>
				<install4j.home>/Applications/install4j.app/Contents/Resources/app</install4j.home>
			</properties>
		</profile>
		<profile>
			<id>unix</id>
			<activation>
				<os>
					<family>unix</family>
				</os>
			</activation>
			<properties>
				<install4j.home>/opt/install4j10</install4j.home>
			</properties>
		</profile>
		<profile>
			<id>windows</id>
			<activation>
				<os>
					<family>windows</family>
				</os>
			</activation>
			<properties>
				<install4j.home>C:\Program Files\install4j10</install4j.home>
			</properties>
		</profile>

		<profile>
			<id>sonatype-repo</id>
			<properties>
				<install4j.skip>true</install4j.skip>
			</properties>
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/content/repositories/releases</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>3.2.0</version>
						<executions>
							<execution>
								<id>attach-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>../sources.jar</file>
											<type>jar</type>
											<classifier>sources</classifier>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- To Deploy javadoc jar and snapshot artifacts run #mvn compile javadoc:jar source:jar deploy -P private-repo -->
		<!-- To Deploy exploded javadoc to iamsoft.com/site : run #mvn compile javadoc:javadoc site:deploy -P private-repo -Dmaven.wagon.threads.min=1 -Dmaven.wagon.threads.max=2 -->
		<!-- (see https://issues.apache.org/jira/browse/MJAVADOC-576) -->
		<profile>
			<id>private-repo</id>
			<properties><proguard.attach>true</proguard.attach></properties>
			<distributionManagement>
				<site>
					<id>s3.artifacts.site</id>
					<url>${repoUrl}/site/javadoc/${project.version}/</url>
				</site>
				<repository>
					<id>s3.artifacts.releases-private</id>
					<url>${repoUrl}/maven-private/</url>
				</repository>
			</distributionManagement>
		</profile>

		<!-- To Deploy javadoc jar and obfuscated release artifacts : run #mvn compile javadoc:jar deploy -P public-repo -->
		<!-- To Deploy exploded javadoc to iamsoft.com/site : run #mvn compile javadoc:javadoc site:deploy -P public-repo -Dmaven.wagon.threads.min=1 -Dmaven.wagon.threads.max=2 -->
		<!-- (see https://issues.apache.org/jira/browse/MJAVADOC-576) -->
		<profile>
			<id>public-repo</id>
			<distributionManagement>
				<site>
					<id>s3.artifacts.site</id>
					<url>${repoUrl}/javadoc/${project.name}/${project.version}/</url>
				</site>
				<repository>
					<id>s3.artifacts.releases</id>
					<url>${repoUrl}/maven/</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
