<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2016-2019 Red Hat, Inc. and/or its affiliates
    and other contributors as indicated by the @author tags.

    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>

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>36</version>
  </parent>

  <groupId>org.wildfly.plugins</groupId>
  <artifactId>wildfly-jar-parent</artifactId>
  <version>10.0.0.Final</version>
  <packaging>pom</packaging>

  <name>WildFly Bootable JAR Plugin Parent</name>
  <inceptionYear>2019</inceptionYear>
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>core</module>
    <module>docs</module>
    <module>plugin</module>
    <module>tests</module>
    <module>extensions</module>
    <module>perf-tests</module>
  </modules>

  <properties>
    <!-- Require Java 11 -->
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.source>11</maven.compiler.source>
    <version.wildfly>29.0.0.Final</version.wildfly>
    <!-- docs properties -->
    <docs.project.branch>10.0.0.Final</docs.project.branch>
    <docs.wildfly.major>29.0</docs.wildfly.major>

    <version.junit>4.13.1</version.junit>
    <version.adoc-maven-plugin-descriptor>1.0.0.Alpha3</version.adoc-maven-plugin-descriptor>
    <version.org.apache.maven.core>3.8.4</version.org.apache.maven.core>
    <version.org.apache.maven.plugin-tools>3.6.4</version.org.apache.maven.plugin-tools>
    <version.org.apache.maven.plugin-plugin>3.6.4</version.org.apache.maven.plugin-plugin>
    <version.org.asciidoctor>2.0.0</version.org.asciidoctor>
    <version.org.jboss.galleon>5.2.0.Final</version.org.jboss.galleon>
    <version.org.wildfly.core.wildfly-core>21.1.0.Final</version.org.wildfly.core.wildfly-core>
    <version.org.wildfly.common>1.5.4.Final</version.org.wildfly.common>
    <version.org.wildfly.plugins.wildfly-maven-plugin>4.2.0.Final</version.org.wildfly.plugins.wildfly-maven-plugin>
    <version.org.wildfly.channel>1.0.2.Final</version.org.wildfly.channel>
    <version.org.wildfly.prospero>1.0.3.Final</version.org.wildfly.prospero>
    <maven.surefire.plugin>3.0.0-M6</maven.surefire.plugin>
    <!-- required by tests -->
    <version.org.apache.httpcomponents.httpclient>4.5.13</version.org.apache.httpcomponents.httpclient>
    <version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>
    <version.org.jboss.logging.slf4j-jboss-logging>1.1.0.Final</version.org.jboss.logging.slf4j-jboss-logging>
    <version.org.apache.maven.plugin-testing.maven-plugin-testing-harness>3.3.0
    </version.org.apache.maven.plugin-testing.maven-plugin-testing-harness>
    <version.org.jboss.shrinkwrap.shrinkwrap>1.2.6</version.org.jboss.shrinkwrap.shrinkwrap>
    <version.org.twdata.maven>2.3.1</version.org.twdata.maven>
    <!-- Checkstyle configuration -->
    <linkXRef>false</linkXRef>
    <version.org.wildfly.checkstyle-config>1.0.8.Final</version.org.wildfly.checkstyle-config>
    <bootable-jar.repo.scm.connection>git@github.com:wildfly-extras/wildfly-jar-maven-plugin.git</bootable-jar.repo.scm.connection>
    <bootable-jar.repo.scm.url>https://github.com/wildfly-extras/wildfly-jar-maven-plugin</bootable-jar.repo.scm.url>

    <maven.test.skip>false</maven.test.skip>
    <skipTests>${maven.test.skip}</skipTests>
    
    <test.default.ee.config>standalone.xml</test.default.ee.config>
    <test.default.ee.cloud.config>standalone-ha.xml</test.default.ee.cloud.config>
    <test.default.config>standalone-microprofile.xml</test.default.config>
    <test.default.cloud.config>standalone-microprofile-ha.xml</test.default.cloud.config>
    <test.fpl>wildfly@maven(org.jboss.universe:community-universe)#${version.wildfly}</test.fpl>
    <test.ee.fpl>wildfly-ee@maven(org.jboss.universe:community-universe)#${version.wildfly}</test.ee.fpl>
    <test.version.wildfly>${version.wildfly}</test.version.wildfly>
    <test.version.wildfly-ee.upgrade>27.0.1.Final</test.version.wildfly-ee.upgrade>
    <test.patch.ee.product>WildFly EE</test.patch.ee.product>
    <test.patch.product>WildFly Full</test.patch.product>
    <test.patch.version>${version.wildfly}</test.patch.version>
    <wildfly.artifactId>wildfly-galleon-pack</wildfly.artifactId>
    <wildfly.groupId>org.wildfly</wildfly.groupId>
    <wildfly-preview.artifactId>wildfly-preview-feature-pack</wildfly-preview.artifactId>
    <wildfly-preview-build-repo-phase>process-test-resources</wildfly-preview-build-repo-phase>
    <surefire.redirect.to.file>true</surefire.redirect.to.file>

    <client.jvm.jpms.args>--add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED</client.jvm.jpms.args>

  </properties>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </repository>
    <!-- repository needed to provision a full server used as patching distribution source -->
    <repository>
      <id>redhat-ga</id>
      <name>Redhat GA</name>
      <url>https://maven.repository.redhat.com/ga/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </repository>
    <!-- Remove below repo after opensaml 4.2.0 is accessible from maven central repo-->
    <repository>
        <id>opensaml-repo</id>
        <name>opensaml</name>
        <url>https://build.shibboleth.net/nexus/content/groups/public</url>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencyManagement>
    <dependencies>
     
     <dependency>
        <groupId>org.twdata.maven</groupId>
        <artifactId>mojo-executor</artifactId>
        <version>${version.org.twdata.maven}</version>
     </dependency>
     <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>wildfly-jar-cloud-extension</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>wildfly-jar-maven-plugin-core</artifactId>
          <version>${project.version}</version>
      </dependency>
        
      <dependency>
        <groupId>org.wildfly.core</groupId>
        <artifactId>wildfly-jar-boot</artifactId>
        <version>${version.org.wildfly.core.wildfly-core}</version>
      </dependency>
      
      <dependency>
        <groupId>org.wildfly.core</groupId>
        <artifactId>wildfly-patching</artifactId>
        <version>${version.org.wildfly.core.wildfly-core}</version>
      </dependency>

      <!-- Required by controller-client and Galleon provisioning -->
      <dependency>
          <groupId>org.wildfly.common</groupId>
          <artifactId>wildfly-common</artifactId>
          <version>${version.org.wildfly.common}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.shrinkwrap</groupId>
        <artifactId>shrinkwrap-api</artifactId>
        <version>${version.org.jboss.shrinkwrap.shrinkwrap}</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.shrinkwrap</groupId>
        <artifactId>shrinkwrap-impl-base</artifactId>
        <version>${version.org.jboss.shrinkwrap.shrinkwrap}</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.core</groupId>
        <artifactId>wildfly-launcher</artifactId>
        <version>${version.org.wildfly.core.wildfly-core}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.galleon</groupId>
        <artifactId>galleon-maven-plugin</artifactId>
        <version>${version.org.jboss.galleon}</version>
      </dependency>
      
      <dependency>
          <groupId>org.jboss.galleon</groupId>
          <artifactId>galleon-core</artifactId>
          <version>${version.org.jboss.galleon}</version>
      </dependency>
      
      <dependency>
          <groupId>org.jboss.galleon</groupId>
          <artifactId>galleon-maven-universe</artifactId>
          <version>${version.org.jboss.galleon}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${version.org.apache.maven.core}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-model</artifactId>
          <scope>provided</scope>
          <version>${version.org.apache.maven.core}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-plugin-api</artifactId>
          <scope>provided</scope>
          <version>${version.org.apache.maven.core}</version>
      </dependency>
      <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-artifact</artifactId>
          <scope>provided</scope>
          <version>${version.org.apache.maven.core}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${version.org.apache.maven.plugin-tools}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.wildfly.checkstyle</groupId>
        <artifactId>wildfly-checkstyle-config</artifactId>
        <version>${version.org.wildfly.checkstyle-config}</version>
      </dependency>
      
      <dependency>
        <groupId>org.wildfly.plugins</groupId>
        <artifactId>wildfly-plugin-core</artifactId>
        <version>${version.org.wildfly.plugins.wildfly-maven-plugin}</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.plugins</groupId>
        <artifactId>wildfly-maven-plugin</artifactId>
        <version>${version.org.wildfly.plugins.wildfly-maven-plugin}</version>
      </dependency>

      <dependency>
          <groupId>org.wildfly.channel</groupId>
          <artifactId>channel-core</artifactId>
          <version>${version.org.wildfly.channel}</version>
      </dependency>

      <dependency>
          <groupId>org.wildfly.channel</groupId>
          <artifactId>maven-resolver</artifactId>
          <version>${version.org.wildfly.channel}</version>
      </dependency>

      <dependency>
        <groupId>org.wildfly.prospero</groupId>
        <artifactId>prospero-metadata</artifactId>
        <version>${version.org.wildfly.prospero}</version>
        <exclusions>
          <exclusion>
            <groupId>*</groupId>
            <artifactId>*</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    <!-- Needed by tests -->
      <dependency>
        <groupId>org.apache.maven.plugin-testing</groupId>
        <artifactId>maven-plugin-testing-harness</artifactId>
        <version>${version.org.apache.maven.plugin-testing.maven-plugin-testing-harness}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-connector-basic</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-transport-http</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.slf4j</groupId>
        <artifactId>slf4j-jboss-logging</artifactId>
        <version>${version.org.jboss.logging.slf4j-jboss-logging}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${version.org.apache.maven.core}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${version.org.apache.httpcomponents.httpclient}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies>
    <dependency>
      <groupId>org.wildfly.checkstyle</groupId>
      <artifactId>wildfly-checkstyle-config</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${version.org.apache.maven.plugin-plugin}</version>
      </plugin>          
      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>wildfly-jar-maven-plugin</artifactId>
        <version>${project.version}</version>
      </plugin>
      
      <plugin>
          <groupId>org.jboss.galleon</groupId>
          <artifactId>galleon-maven-plugin</artifactId>
          <version>${version.org.jboss.galleon}</version>
      </plugin>

        <!-- Checkstyle -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.checkstyle.plugin}</version>
          <configuration>
            <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
            <consoleOutput>true</consoleOutput>
            <failsOnError>true</failsOnError>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <excludes>**/*$logger.java,**/*$bundle.java,**/HelpMojo.java</excludes>
            <useFile />
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.wildfly.checkstyle</groupId>
              <artifactId>wildfly-checkstyle-config</artifactId>
              <version>${version.org.wildfly.checkstyle-config}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>check-style</id>
              <phase>compile</phase>
              <goals>
                <goal>checkstyle</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>11</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
      <profile>
          <id>xp</id>
          <activation>
              <property>
                  <name>xp</name>
              </property>
          </activation>
          <properties>
            <wildfly.groupId>org.jboss.eap</wildfly.groupId>
            <version.wildfly>3.0.0.GA-redhat-SNAPSHOT</version.wildfly>
            <test.version.wildfly-ee.upgrade>7.3.6.GA-redhat-00002</test.version.wildfly-ee.upgrade>
            <test.fpl>${wildfly.groupId}:${wildfly.artifactId}:${version.wildfly}</test.fpl>
            <test.patch.product>JBoss EAP</test.patch.product>
            <test.patch.version>7.4.0.GA</test.patch.version>
            <wildfly-preview-build-repo-phase>none</wildfly-preview-build-repo-phase>
          </properties>
      </profile>
  </profiles>
  <scm>
      <connection>scm:git:${bootable-jar.repo.scm.connection}</connection>
      <developerConnection>scm:git:${bootable-jar.repo.scm.connection}</developerConnection>
      <url>${bootable-jar.repo.scm.url}</url>
      <tag>10.0.0.Final</tag>
  </scm>
</project>
