<!--
 ~ Copyright (c) 2019, 2025, Gluon
 ~ All rights reserved.
 ~
 ~ Redistribution and use in source and binary forms, with or without
 ~ modification, are permitted provided that the following conditions are met:
 ~
 ~ * Redistributions of source code must retain the above copyright notice, this
 ~   list of conditions and the following disclaimer.
 ~
 ~ * Redistributions in binary form must reproduce the above copyright notice,
 ~   this list of conditions and the following disclaimer in the documentation
 ~   and/or other materials provided with the distribution.
 ~
 ~ * Neither the name of the copyright holder nor the names of its
 ~   contributors may be used to endorse or promote products derived from
 ~   this software without specific prior written permission.
 ~
 ~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 ~ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 ~ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 ~ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 ~ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 ~ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 ~ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 ~ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 ~ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 ~ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  -->

<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.gluonhq</groupId>
  <artifactId>gluonfx-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <version>1.0.27</version>
  <name>GluonFX plugin for Maven</name>
  <description>GluonFX plugin allows to run JavaFX application on the JVM or to create their native images.</description>
  <inceptionYear>2019</inceptionYear>
  <url>https://github.com/gluonhq/gluonfx-maven-plugin</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.release>11</maven.compiler.release>
    <source.plugin.version>3.3.0</source.plugin.version>
    <javadoc.plugin.version>3.5.0</javadoc.plugin.version>
    <gpg.plugin.version>3.1.0</gpg.plugin.version>
    <maven.plugin.version>3.9.9</maven.plugin.version>
    <substrate.version>0.0.67</substrate.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.gluonhq</groupId>
      <artifactId>substrate</artifactId>
      <version>${substrate.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.plugin.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.plugin.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.15.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-util</artifactId>
      <version>2.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-invoker</artifactId>
      <version>3.3.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-exec</artifactId>
      <version>1.4.0</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>gluon-snapshots</id>
      <url>https://nexus.gluonhq.com/nexus/content/repositories/public-snapshots</url>
    </repository>
    <repository>
      <id>gluon-releases</id>
      <url>https://nexus.gluonhq.com/nexus/content/repositories/releases</url>
    </repository>
    <repository>
      <id>snapshot</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.15.0</version>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.7.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <autoPublish>true</autoPublish>
          <waitUntil>published</waitUntil>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>enforce-no-snapshots</id>
            <phase>install</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireReleaseDeps>
                  <message>Snapshot dependencies are not allowed for release project version!</message>
                  <onlyWhenRelease>true</onlyWhenRelease> 
                </requireReleaseDeps>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${source.plugin.version}</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-javadoc-plugin</artifactId>
            <version>${javadoc.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <source>8</source>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${gpg.plugin.version}</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 -->
                  <!-- Only required for GPG >= 2.2 -->
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <organization>
    <name>Gluon</name>
    <url>https://www.gluonhq.com</url>
  </organization>

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

  <licenses>
    <license>
      <name>3-Clause BSD License</name>
      <url>https://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Abhinay Agarwal</name>
      <email>abhinay.agarwal@gluonhq.com</email>
      <organization>Gluon</organization>
      <organizationUrl>https://www.gluonhq.com</organizationUrl>
    </developer>
    <developer>
      <name>José Pereda</name>
      <email>jose.pereda@gluonhq.com</email>
      <organization>Gluon</organization>
      <organizationUrl>https://www.gluonhq.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/gluonhq/gluonfx-maven-plugin</url>
    <connection>scm:git:git://github.com/gluonhq/gluonfx-maven-plugin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:gluonhq/gluonfx-maven-plugin.git</developerConnection>
  </scm>
</project>
