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

    Copyright 2016-2020 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>28</version>
  </parent>

  <groupId>org.jboss.galleon</groupId>
  <artifactId>galleon-parent</artifactId>
  <version>2.0.2.Final</version>
  <packaging>pom</packaging>

  <name>Galleon Parent</name>
  <inceptionYear>2016</inceptionYear>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>http://repository.jboss.org/licenses/apache-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>core</module>
    <module>maven-plugin</module>
    <module>cli</module>
    <module>maven-universe</module>
    <module>testsuite</module>
    <module>docs</module>
    <module>dist</module>
  </modules>

  <properties>
    <!--
        Dependency versions. Please keep alphabetical.

        Each version property should be of the form "version.<groupId>".
        For example: <version.org.jboss.as>

        In cases where multiple artifacts use the same groupId but have different
        versions, add the artifactId or other qualifier to the property name.
        For example: <version.org.jboss.as.console>
    -->

    <version.com.googlecode.java-diff-utils>1.3.0</version.com.googlecode.java-diff-utils>
    <version.com.io7m.xom>1.2.10</version.com.io7m.xom>
    <version.com.mycila.license-maven-plugin>3.0</version.com.mycila.license-maven-plugin>
    <version.junit>4.12</version.junit>
    <version.maven-aether-provider>3.3.9</version.maven-aether-provider>
    <version.maven-settings-builder>3.3.9</version.maven-settings-builder>
    <version.org.aesh>1.5</version.org.aesh>
    <version.org.aesh-extensions>1.3</version.org.aesh-extensions>
    <version.org.apache.maven>3.3.1</version.org.apache.maven>
    <version.org.apache.maven.plugin-tools>${version.plugin.plugin}</version.org.apache.maven.plugin-tools>
    <version.org.apache.maven.plugins.maven-shade-plugin>3.1.0</version.org.apache.maven.plugins.maven-shade-plugin>
    <version.org.codehaus.mojo.xml-maven-plugin>1.0.1</version.org.codehaus.mojo.xml-maven-plugin>
    <version.org.eclipse.aether>1.1.0</version.org.eclipse.aether>
    <version.org.jboss.logging>3.3.1.Final</version.org.jboss.logging>
    <version.org.jboss.logmanager>2.0.6.Final</version.org.jboss.logmanager>
    <version.org.jboss.staxmapper>1.1.0.Final</version.org.jboss.staxmapper>
    <version.plugin.plugin>3.5</version.plugin.plugin>

    <!-- sfl4j is brought in by eclipse aether and version needs to be overridden. Currently only used in tool module -->
    <version.org.slf4j>1.7.21</version.org.slf4j>
    <version.org.jboss.logging.slf4j-jboss-logging>1.1.0.Final</version.org.jboss.logging.slf4j-jboss-logging>

    <!-- Checkstyle configuration -->
    <linkXRef>false</linkXRef>
    <version.org.wildfly.checkstyle-config>1.0.4.Final</version.org.wildfly.checkstyle-config>

    <!-- license-maven-plugin configuration -->
    <license.failIfMissing>true</license.failIfMissing>
    <license.failIfUnknown>true</license.failIfUnknown>

    <output.dir.prefix>galleon</output.dir.prefix>
  </properties>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://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>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencyManagement>
    <dependencies>

      <!-- Modules in this project -->

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-core</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-maven-plugin</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-maven-universe</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-cli</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>galleon-testsuite</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- External Dependencies -->

      <dependency>
        <groupId>com.io7m.xom</groupId>
        <artifactId>xom</artifactId>
        <version>${version.com.io7m.xom}</version>
      </dependency>

      <dependency>
        <groupId>org.aesh</groupId>
        <artifactId>aesh</artifactId>
        <version>${version.org.aesh}</version>
      </dependency>
      <dependency>
        <groupId>org.aesh</groupId>
        <artifactId>aesh-extensions</artifactId>
        <version>${version.org.aesh-extensions}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-aether-provider</artifactId>
        <version>${version.maven-aether-provider}</version>
      </dependency>
 
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings-builder</artifactId>
        <version>${version.maven-settings-builder}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${version.org.apache.maven}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model-builder</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-repository-metadata</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${version.org.apache.maven}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${version.org.apache.maven.plugin-tools}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

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

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-api</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-util</artifactId>
        <version>${version.org.eclipse.aether}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-impl</artifactId>
        <version>${version.org.eclipse.aether}</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-file</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>com.googlecode.java-diff-utils</groupId>
        <artifactId>diffutils</artifactId>
        <version>${version.com.googlecode.java-diff-utils}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>staxmapper</artifactId>
        <version>${version.org.jboss.staxmapper}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>${version.org.jboss.logging}</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.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>

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

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
        <scope>test</scope>
      </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>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${version.com.mycila.license-maven-plugin}</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>
            <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>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <!--suppress MavenModelInspection -->
          <groupId>org.eclipse.m2e</groupId>
          <!--suppress MavenModelInspection -->
          <artifactId>lifecycle-mapping</artifactId>
          <!--suppress MavenModelInspection -->
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      org.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-checkstyle-plugin
                    </artifactId>
                    <versionRange>
                      [2.5,)
                    </versionRange>
                    <goals>
                      <goal>checkstyle</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xml-maven-plugin</artifactId>
          <version>${version.org.codehaus.mojo.xml-maven-plugin}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <inlineHeader>Copyright ${license.git.copyrightYears} 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.</inlineHeader>
          <excludes>
            <exclude>**/*.adoc</exclude>
            <exclude>**/README</exclude>
            <exclude>**/README.*</exclude>
            <exclude>**/LICENSE</exclude>
            <exclude>**/*.html</exclude>
            <exclude>**/*.htm</exclude>
            <exclude>**/nbproject/*</exclude>
            <exclude>**/.idea/*</exclude>
            <exclude>**/.idea/**/*</exclude>
            <exclude>mvnw</exclude>
            <exclude>mvnw.cmd</exclude>
          </excludes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
            <yaml>SCRIPT_STYLE</yaml>
            <yml>SCRIPT_STYLE</yml>
          </mapping>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin-git</artifactId>
            <version>${version.com.mycila.license-maven-plugin}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </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>1.8</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <!-- *.xml and *.xsl are included by default -->
        <executions>
          <execution>
            <id>xml-check-format</id>
            <phase>verify</phase>
            <goals>
              <goal>check-format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
