<?xml version="1.0" encoding="UTF-8"?>
<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">

  <!-- Parent -->
  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>49</version>
    <relativePath />
  </parent>

  <!-- Model Information -->
  <modelVersion>4.0.0</modelVersion>

  <!-- Artifact Information -->
  <groupId>org.jboss.arquillian</groupId>
  <artifactId>arquillian-parent</artifactId>
  <version>1.10.0.Final</version>
  <packaging>pom</packaging>
  <name>Arquillian Aggregator</name>
  <url>http://arquillian.org</url>
  <description>Arquillian Aggregator</description>

  <properties>
    <!-- jboss-parent override -->
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <version.javadoc.plugin>3.4.0</version.javadoc.plugin>

    <!-- External Deps -->
    <version.shrinkwrap_shrinkwrap>1.2.6</version.shrinkwrap_shrinkwrap>
    <version.shrinkwrap_descriptors>2.0.0</version.shrinkwrap_descriptors>

    <!-- Checkstyle plugin -->
    <version.org.apache.maven-checkstyle-plugin>3.6.0</version.org.apache.maven-checkstyle-plugin>
    <version.com.puppycrawl.checkstyle>9.3</version.com.puppycrawl.checkstyle>
    <version.org.wildfly.checkstyle-config>1.0.8.Final</version.org.wildfly.checkstyle-config>
  </properties>

  <issueManagement>
    <system>jira</system>
    <url>https://issues.redhat.com/browse/ARQ</url>
  </issueManagement>

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

  <scm>
    <connection>scm:git:git://git@github.com:arquillian/arquillian-core.git</connection>
    <developerConnection>scm:git:ssh://github.com/arquillian/arquillian-core.git</developerConnection>
    <url>git://github.com/arquillian/arquillian-core.git</url>
    <tag>1.10.0.Final</tag>
  </scm>

  <modules>
    <module>build</module>
    <module>core</module>
    <module>config</module>
    <module>test</module>
    <module>container</module>

    <module>junit</module>
    <module>junit5</module>
    <module>testng</module>

    <module>testenrichers</module>
    <module>protocols</module>

    <module>bom</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${version.org.apache.maven-checkstyle-plugin}</version>
        <dependencies>
          <dependency>
            <!-- The puppycrawl dependency is needed to override the version using JDK11 from the parent -->
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${version.com.puppycrawl.checkstyle}</version>
          </dependency>
          <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>
        <configuration>
          <linkXRef>false</linkXRef>
          <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <trimStackTrace>false</trimStackTrace>
          <printSummary>true</printSummary>
          <includes>
            <include>**/*TestCase.java</include>
            <include>**/*TestSuite.java</include>
          </includes>
          <useFile>true</useFile>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>integration-tests</id>
      <modules>
        <module>integration-tests</module>
      </modules>
    </profile>
    <profile>
      <id>release</id>
      <modules>
        <module>integration-tests</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-release-plugin</artifactId>
            <inherited>true</inherited>
            <configuration>
              <autoVersionSubmodules>true</autoVersionSubmodules>
              <pushChanges>false</pushChanges>
              <localCheckout>true</localCheckout>
              <preparationGoals>clean install</preparationGoals>
              <releaseProfiles>gpg-sign,jboss-release</releaseProfiles>
              <arguments>-DskipItTests=true</arguments>
              <tagNameFormat>@{project.version}</tagNameFormat>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <doclet>nl.talsmasoftware.umldoclet.UMLDoclet</doclet>
              <docletArtifact>
                <groupId>nl.talsmasoftware</groupId>
                <artifactId>umldoclet</artifactId>
                <version>2.0.18</version>
              </docletArtifact>
              <useStandardDocletOptions>true</useStandardDocletOptions>
              <charset>UTF-8</charset>
              <encoding>UTF-8</encoding>
              <docencoding>UTF-8</docencoding>
              <breakiterator>true</breakiterator>
              <version>true</version>
              <author>true</author>
              <keywords>true</keywords>
              <additionalOptions>
                <additionalOption>-sourceclasspath  ${project.build.outputDirectory}</additionalOption>
              </additionalOptions>
              <stylesheetfile>${project.parent.parent.basedir}/javadoc/stylesheet.css</stylesheetfile>
              <javadocDirectory>${project.parent.parent.basedir}/javadoc</javadocDirectory>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

      <distributionManagement>
        <repository>
          <id>${jboss.releases.repo.id}</id>
          <name>JBoss Releases Repository</name>
          <url>${jboss.releases.repo.url}</url>
        </repository>
        <snapshotRepository>
          <id>${jboss.snapshots.repo.id}</id>
          <name>JBoss Snapshots Repository</name>
          <url>${jboss.snapshots.repo.url}</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>
</project>
