<?xml version="1.0"?>

<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.fusesource.mvnplugins</groupId>
    <artifactId>mvnplugins</artifactId>
    <version>1.39</version>
  </parent>

  <groupId>org.fusesource.mvnplugins</groupId>
  <artifactId>smartics-jboss-modules-maven-plugin</artifactId>
  <version>1.39</version>
  <packaging>maven-plugin</packaging>

  <name>${project.artifactId}</name>
  <description>
    Generates an archive of modules to be copied to an JBoss 7 installation.
  </description>
  <url>${weburl}</url>
  <inceptionYear>2013</inceptionYear>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
      <comments>Copyright 2013-2014 Kronseder &amp; Reiner GmbH, smartics</comments>
    </license>
  </licenses>

  <contributors>
    <contributor>
      <name>Douglas Palmer</name>
      <roles>
        <role>Developer</role>
      </roles>
    </contributor>
  </contributors>

  <properties>
    <issues-product>${project.artifactId}</issues-product>
    <issues-component />

    <donationId>ZNFSBTAQJ49HA</donationId>
    <ohlohProjectId>710977</ohlohProjectId>
    <twitterId>smartics</twitterId>

    <maven.version>3.2.5</maven.version>
    <maven.project.version>2.2.1</maven.project.version>
    <maven-plugin-plugin.version>3.2</maven-plugin-plugin.version>
    <aether.version>1.0.0.v20140518</aether.version>

    <smartics-commons.version>0.5.2</smartics-commons.version>
    <testdoc.version>0.4.1</testdoc.version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>de.smartics.util</groupId>
      <artifactId>smartics-commons</artifactId>
      <version>${smartics-commons.version}</version>
    </dependency>


    <!--  ... maven ....................................................... -->

    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${maven.project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-settings</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-archiver</artifactId>
      <version>2.5</version>
    </dependency>


    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-api</artifactId>
      <version>${aether.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-util</artifactId>
      <version>${aether.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.aether</groupId>
      <artifactId>aether-transport-wagon</artifactId>
      <version>${aether.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-http-lightweight</artifactId>
      <version>2.0</version>
    </dependency>

    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jandex</artifactId>
      <version>1.0.3.Final</version>
    </dependency>


    <!-- ... other ........................................................ -->

    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>jdom2</artifactId>
      <version>2.0.5</version>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.6.4</version>
    </dependency>

    <!-- ... test ......................................................... -->

    <dependency>
      <groupId>de.smartics.util</groupId>
      <artifactId>smartics-test-utils</artifactId>
      <version>0.3.3</version>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>de.smartics.testdoc</groupId>
      <artifactId>testdoc-core</artifactId>
      <version>${testdoc.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>de.smartics.testdoc</groupId>
      <artifactId>testdoc-annotations</artifactId>
      <version>${testdoc.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>de.smartics.maven.plugin</groupId>
          <artifactId>bugzilla-maven-plugin</artifactId>
          <configuration>
            <classification>Build Management</classification>
            <initialOwner>${user.email}</initialOwner>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-testCompile</id>
            <configuration>
              <annotationProcessors>
                <annotationProcessor>de.smartics.testdoc.collect.processor.TestDocProcessor</annotationProcessor>
              </annotationProcessors>
              <testCompilerArgument>-Atdoc.exporter.baseDir=${project.build.directory}/testdoc/ser</testCompilerArgument>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <configuration>
          <instrumentation>
            <excludes>
              <exclude>**/**</exclude>
            </excludes>
          </instrumentation>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>skip-cobertura</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <!-- <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution> -->
        </executions>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
      </plugin>

      <plugin>
        <!-- Required until update to pom-root: 30.1.2 -->
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/.idea/**</exclude>
            <exclude>**/.externalToolBuilders/**</exclude>
            <exclude>**/.factorypath</exclude>
            <exclude>**/.apt_generated/**</exclude>
            <exclude>**/.fbprefs</exclude>
            <exclude>**/.pmd</exclude>
            <exclude>**/.checkstyle</exclude>
            <exclude>**/.ruleset</exclude>
            <exclude>**/COPYRIGHT.txt</exclude>
            <exclude>**/LICENSE.txt</exclude>
            <exclude>**/LICENSE-*</exclude>
            <exclude>**/*.xcf</exclude>
            <exclude>**/*.uml</exclude>
            <exclude>**/*.umlusc</exclude>
            <exclude>**/javadoc.xml</exclude>
            <exclude>**/header.txt</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.7</version><!--$NO-MVN-MAN-VER$-->
        <executions>
          <execution>
            <id>transform</id>
            <phase>pre-site</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <xslt in="${basedir}/src/main/resources/xsd/jboss-modules-descriptor.xsd" out="${project.build.directory}/generated-site/xdoc/jboss-modules-descriptor-doc.xml" style="${basedir}/src/etc/xsl/create-modules-doc.xsl" />
                <copy todir="${project.build.directory}/generated-site/resources/download">
                  <fileset dir="${basedir}/src/main/resources/">
                    <include name="**/*.xsd" />
                  </fileset>
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant-nodeps</artifactId>
            <version>1.8.1</version>
          </dependency>
          <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant-trax</artifactId>
            <version>1.8.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>de.smartics.maven.plugin</groupId>
        <artifactId>apidoc-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <configuration>
          <requirements>
            <maven>3.1</maven>
          </requirements>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>it</id>
      <!-- mvn -Pit integration-test -Dinvoker.test=multimodule-project -->
      <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.8</version>
            <configuration>
              <debug>true</debug>
              <projectsDirectory>src/it</projectsDirectory>
              <settingsFile>src/it/settings.xml</settingsFile>

              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>

              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <preBuildHookScript>setup</preBuildHookScript>
              <postBuildHookScript>validate</postBuildHookScript>

              <goals>
                <goal>clean</goal>
                <goal>package</goal>
              </goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <!-- enables extra repositories which may have some
         goodies that have not reached central yet -->
    <profile>
      <id>download</id>

        <repositories>
          <repository>
            <id>smartics</id>
            <url>http://www.smartics.eu/nexus/content/groups/public-group</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>false</enabled>
            </snapshots>
          </repository>
        </repositories>
        <pluginRepositories>
          <pluginRepository>
            <id>smartics</id>
            <url>http://www.smartics.eu/nexus/content/groups/public-group</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>false</enabled>
            </snapshots>
          </pluginRepository>
        </pluginRepositories>
    
    </profile>
  </profiles>
</project>
