<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2010, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<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>
    <parent>
        <artifactId>jboss-parent</artifactId>
        <groupId>org.jboss</groupId>
        <version>39</version>
    </parent>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin-parent</artifactId>
    <version>4.0.0.Beta4</version>
    <packaging>pom</packaging>
    <name>WildFly Maven Plugin - Parent</name>

    <description>A maven plugin that allows various management operations to be executed on WildFly Application
        Server.
    </description>
    <url>https://www.wildfly.org</url>

    <issueManagement>
        <system>JIRA</system>
        <url>https://issues.jboss.org/browse/WFMP</url>
    </issueManagement>

    <!-- required when provisioning the server for tests, using Galleon plugin to be removed when WF doesn't require them -->
    <repositories>
        <repository>
            <id>nexus</id>
            <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
        </repository>
        <repository>
            <id>redhat-ga</id>
            <url>https://maven.repository.redhat.com/ga/</url>
        </repository>
    </repositories>

    <mailingLists>
        <mailingList>
            <name>JBoss User List</name>
            <subscribe>https://lists.jboss.org/mailman/listinfo/jboss-user</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/jboss-user</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/jboss-user/</archive>
        </mailingList>
        <mailingList>
            <name>WildFly Developer List</name>
            <subscribe>https://lists.jboss.org/mailman/listinfo/wildfly-dev</subscribe>
            <unsubscribe>https://lists.jboss.org/mailman/listinfo/wildfly-dev</unsubscribe>
            <archive>http://lists.jboss.org/pipermail/wildfly-dev/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>${wildfly.scm.connection}</connection>
        <developerConnection>${wildfly.scm.developer.connection}</developerConnection>
        <url>${wildfly.scm.url}</url>
    </scm>

    <licenses>
        <license>
            <name>GNU Lesser General Public License v2.1 only</name>
            <url>http://repository.jboss.org/licenses/lgpl-2.1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>


    <properties>
        <!-- WildFly/JBoss dependencies -->
        <version.org.jboss.logging.jboss-logging>3.4.2.Final</version.org.jboss.logging.jboss-logging>
        <version.org.jboss.logmanager>2.1.10.Final</version.org.jboss.logmanager>
        <version.org.wildfly.checkstyle-config>1.0.8.Final</version.org.wildfly.checkstyle-config>
        <version.org.wildfly.common.wildfly-common>1.5.4.Final</version.org.wildfly.common.wildfly-common>
        <!-- This version property is also retrieved by plugin at runtime to resolve CLI artifact -->
        <version.org.wildfly.core>17.0.1.Final</version.org.wildfly.core>
        <version.org.wildfly>25.0.0.Final</version.org.wildfly>
        <version.org.wildfly.channel>1.0.0.Beta2</version.org.wildfly.channel>

        <!-- maven dependencies -->
        <version.javax.inject.javax.inject>1</version.javax.inject.javax.inject>
        <version.org.apache.maven.maven-core>3.3.1</version.org.apache.maven.maven-core>
        <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.apache.maven.plugin-tools>3.5.1</version.org.apache.maven.plugin-tools>
        <version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>
        <version.org.eclipse.sisu>0.3.5</version.org.eclipse.sisu>

        <!-- other dependencies -->
        <version.com.bernardomg.maven.skins>2.2.6</version.com.bernardomg.maven.skins>
        <version.junit.junit>4.13.1</version.junit.junit>
        <version.org.apache.commons.compress>1.21</version.org.apache.commons.compress>
        <version.org.mockito.mockito>2.18.3</version.org.mockito.mockito>

        <!-- Require at least Java 11 to compile -->
        <jdk.min.version>11</jdk.min.version>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>

        <!-- galleon properties -->
        <version.org.jboss.galleon>5.0.5.Final</version.org.jboss.galleon>
        <plugin.fork.embedded>true</plugin.fork.embedded>
        <!-- used by tests -->
        <version.org.jboss.logging.slf4j-jboss-logging>1.2.1.Final</version.org.jboss.logging.slf4j-jboss-logging>
        <version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>

        <!-- checkstyle configuration -->
        <linkXRef>false</linkXRef>

        <!-- documentation properties -->
        <appServerName>WildFly</appServerName>
        <pluginPrefix>wildfly</pluginPrefix>

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

        <!-- Other properties -->
        <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
    </properties>

    <modules>
        <module>core</module>
        <module>plugin</module>
        <module>tests</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <additionalJOption>--no-module-directories</additionalJOption>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.sisu</groupId>
                    <artifactId>sisu-maven-plugin</artifactId>
                    <version>${version.org.eclipse.sisu}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jboss.galleon</groupId>
                    <artifactId>galleon-maven-plugin</artifactId>
                    <version>${version.org.jboss.galleon}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <release>${maven.compiler.target}</release>
                    <testRelease>${maven.compiler.testTarget}</testRelease>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <excludes>**/HelpMojo.java</excludes>
                    <failsOnError>true</failsOnError>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <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>
                <artifactId>maven-site-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <!-- Docs Maven Skin -->
                        <groupId>com.bernardomg.maven.skins</groupId>
                        <artifactId>docs-maven-skin</artifactId>
                        <version>${version.com.bernardomg.maven.skins}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${version.javax.inject.javax.inject}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${version.org.apache.commons.compress}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-core</artifactId>
                <version>${version.org.apache.maven.maven-core}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-plugin-api</artifactId>
                <version>${version.org.apache.maven.maven-core}</version>
            </dependency>
            <!-- dependencies to annotations -->
            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>${version.org.apache.maven.plugin-tools}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.aether</groupId>
                <artifactId>aether-api</artifactId>
                <version>${version.org.eclipse.aether}</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.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.org.jboss.logging.jboss-logging}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.common</groupId>
                <artifactId>wildfly-common</artifactId>
                <version>${version.org.wildfly.common.wildfly-common}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-cli</artifactId>
                <version>${version.org.wildfly.core}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jboss.logging</groupId>
                        <artifactId>jboss-logging-processor</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.jboss.logmanager</groupId>
                        <artifactId>jboss-logmanager</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-plugin-core</artifactId>
                <version>${project.version}</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.checkstyle</groupId>
                <artifactId>wildfly-checkstyle-config</artifactId>
                <version>${version.org.wildfly.checkstyle-config}</version>
                <!-- only needed during compile -->
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-controller-client</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-launcher</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>
            <!-- Seems to be needed as the controller client is transitively bringing it in -->
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-protocol</artifactId>
                <version>${version.org.wildfly.core}</version>
            </dependency>

            <!-- Test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-compat</artifactId>
                <version>${version.org.apache.maven.maven-core}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven</groupId>
                <artifactId>maven-settings-builder</artifactId>
                <version>${version.org.apache.maven.maven-core}</version>
            </dependency>
            <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.jboss.logmanager</groupId>
                <artifactId>jboss-logmanager</artifactId>
                <version>${version.org.jboss.logmanager}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.org.mockito.mockito}</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>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>generate-javadoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>javadoc</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
