<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright 2012 Daniel Zwolenski, et al.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

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

    <groupId>com.zenjava</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>8.1.4</version>

    <packaging>maven-plugin</packaging>

    <name>JavaFX Maven Plugin</name>
    <url>https://github.com/javafx-maven-plugin/javafx-maven-plugin</url>
    <description>
        The JavaFX Maven Plugin provides a way to to assemble distributable bundles for JavaFX applications from within
        Maven. It provides a wrapper around the JavaFX packaging tools which are provided as part of the JavaFX
        installation.
    </description>
    <inceptionYear>2012</inceptionYear>

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

    <developers>
        <developer>
            <id>zonski</id>
            <name>Daniel Zwolenski</name>
            <email>zonski@gmail.com</email>
            <roles>
                <role>Original Author</role>
            </roles>
        </developer>
        <developer>
            <id>fibrefox</id>
            <name>Danny Althoff</name>
            <email>fibrefox@dynamicfiles.de</email>
            <roles>
                <role>Maintainer</role>
            </roles>
        </developer>
        <developer>
            <id>maxd</id>
            <name>Maxim Dobryakov</name>
            <email>job.dmm@gmail.com</email>
            <roles>
                <role>Maintainer</role>
            </roles>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Danno Ferrin</name>
            <email>danno.ferrin@gmail.com</email>
            <properties>
                <github>shemnon</github>
            </properties>
        </contributor>
        <contributor>
            <name>Christian Fritz</name>
            <properties>
                <github>chr-fritz</github>
            </properties>
        </contributor>
        <contributor>
            <name>Paul Merlin</name>
            <properties>
                <github>eskatos</github>
            </properties>
        </contributor>
        <contributor>
            <name>Thomas Herzog</name>
            <properties>
                <github>mcduke</github>
            </properties>
        </contributor>
        <contributor>
            <name>MiChOo</name>
            <properties>
                <github>michoo</github>
            </properties>
        </contributor>
        <contributor>
            <name>Kevin Coghlan</name>
            <properties>
                <github>kevincoghlan</github>
            </properties>
        </contributor>
        <contributor>
            <name>Bartosz Firyn</name>
            <properties>
                <github>sarxos</github>
            </properties>
        </contributor>
        <contributor>
            <name>Oliver Günther</name>
            <email>oliver.guenther@tuhh.de</email>
            <properties>
                <github>og0815</github>
            </properties>
        </contributor>
        <contributor>
            <name>Nick Currier</name>
            <properties>
                <github>hexid</github>
            </properties>
        </contributor>
        <contributor>
            <name>Jabqooo</name>
            <properties>
                <github>Jabqooo</github>
            </properties>
        </contributor>
        <contributor>
            <name>BTAN</name>
            <email>BTAN@MF110187.lafayette.micropole.com</email>
            <properties>
                <github>boliang-micropole</github>
            </properties>
        </contributor>
    </contributors>

    <scm>
        <connection>scm:git:git://github.com/javafx-maven-plugin/javafx-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:javafx-maven-plugin/javafx-maven-plugin.git</developerConnection>
        <url>https://github.com/javafx-maven-plugin/javafx-maven-plugin.git</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.8</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <build>
        <plugins>
            <!-- Coding-Convention-Check via Checkstyle -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.15</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>checkstyle.xml</configLocation>
                            <headerLocation>license.header</headerLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>false</failsOnError>
                            <failOnViolation>false</failOnViolation>
                            <linkXRef>false</linkXRef>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <showDeprecation>true</showDeprecation>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.4</version>
                <configuration>
                    <goalPrefix>jfx</goalPrefix>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.wagon</groupId>
                        <artifactId>wagon-ftp</artifactId>
                        <version>2.4</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.8.0-20</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <!-- integration-testing via own projects -->
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>1.10</version>
                <configuration>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <showErrors>true</showErrors>
                    <streamLogs>true</streamLogs>
                    <skipInvocation>${skipTests}</skipInvocation>
                    <postBuildHookScript>verify.bsh</postBuildHookScript>
                </configuration>
                <executions>
                    <execution>
                        <id>invoker-tests</id>
                        <phase>install</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
    
        <!-- profile-triggers -->
        <doSign>false</doSign>
        <doRelease>false</doRelease>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.twdata.maven</groupId>
            <artifactId>mojo-executor</artifactId>
            <version>2.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>keytool-maven-plugin</artifactId>
            <version>1.5</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javafx-packager</groupId>
            <artifactId>javafx-packager</artifactId>
            <version>1.8.0_20</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/ant-javafx.jar</systemPath>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>generate-signed-files</id>
            <activation>
                <property>
                    <name>doSign</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- sign stuff for maven-central via OSSRH/Sonatype -->
                    <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>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-to-ossrh</id>
            <activation>
                <property>
                    <name>doRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.5</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
