<?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>10</version>
    </parent>
    <groupId>org.jboss.as.plugins</groupId>
    <artifactId>jboss-as-maven-plugin</artifactId>
    <version>7.9.Final</version>
    <packaging>maven-plugin</packaging>
    <name>JBoss AS7 Deployment Plugin</name>

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

    <scm>
        <connection>scm:git://github.com/jbossas/jboss-as-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:jbossas/jboss-as-maven-plugin.git</developerConnection>
        <url>http://github.com/jbossas/jboss-as-maven-plugin</url>
    </scm>

    <licenses>
        <license>
            <name>lgpl</name>
            <url>http://repository.jboss.org/licenses/lgpl-2.1.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>


    <properties>
        <version.junit.junit>4.11</version.junit.junit>
        <version.org.jboss.as>7.2.0.Final</version.org.jboss.as>
        <!-- JBoss AS 7.1.2 distribution artifact is not deployed to the jboss
            nexus repository -->
        <version.org.jboss.as.dist>7.1.1.Final</version.org.jboss.as.dist>
        <version.org.apache.commons.compress>1.5</version.org.apache.commons.compress>
        <version.org.apache.maven.maven-plugin>2.2.1</version.org.apache.maven.maven-plugin>
        <version.org.apache.maven.maven-core>3.0.5</version.org.apache.maven.maven-core>
        <version.org.apache.maven.plugin-testing.maven-plugin-testing-harness>2.0-alpha-1
        </version.org.apache.maven.plugin-testing.maven-plugin-testing-harness>
        <version.org.apache.maven.plugin-tools>3.2</version.org.apache.maven.plugin-tools>
        <version.org.codehaus.plexus.plexus-utils>3.0.10</version.org.codehaus.plexus.plexus-utils>
        <version.org.codehaus.plexus.plexus-component-metadata>1.5.5
        </version.org.codehaus.plexus.plexus-component-metadata>
        <version.org.eclipse.aether>0.9.0.M3</version.org.eclipse.aether>
        <version.org.jboss.remoting3>3.2.12.GA</version.org.jboss.remoting3>
        <version.org.mockito.mockito-all>1.9.0</version.org.mockito.mockito-all>
        <version.org.sonatype.aether>1.13.1</version.org.sonatype.aether>
        <version.org.jboss.arquillian>1.0.3.Final</version.org.jboss.arquillian>

        <jboss.home>${project.build.directory}${file.separator}jboss-as-${version.org.jboss.as.dist}</jboss.home>

        <version.dependency.plugin>2.9</version.dependency.plugin>
        <version.enforcer.plugin>1.3</version.enforcer.plugin>
        <version.plugin.plugin>3.3</version.plugin.plugin>
        <version.project.info.reports.plugin>2.7</version.project.info.reports.plugin>
        <version.site.plugin>3.4</version.site.plugin>

        <!-- Checkstyle configuration -->
        <linkXRef>false</linkXRef>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <relativizeDecorationLinks>false</relativizeDecorationLinks>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${version.project.info.reports.plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <!-- if you want to generate help goal -->
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                        <configuration>
                            <helpPackageName>org.jboss.as.plugin.generated</helpPackageName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-jboss</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.jboss.as</groupId>
                                    <artifactId>jboss-as-dist</artifactId>
                                    <version>${version.org.jboss.as.dist}</version>
                                    <type>zip</type>
                                    <!-- overwrite to clean any previous deployments -->
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <useFile/>
                </configuration>
                <executions>
                    <execution>
                        <id>check-style</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <systemPropertyVariables>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <jboss.home>${jboss.home}</jboss.home>
                        <jboss.test.config.dir>
                            ${project.build.testOutputDirectory}${file.separator}unit${file.separator}common
                        </jboss.test.config.dir>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <version>${version.org.codehaus.plexus.plexus-component-metadata}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

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

    <dependencies>

        <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>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${version.org.apache.maven.maven-plugin}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings</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>
        <!-- generated help mojo has a dependency to plexus-utils -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${version.org.codehaus.plexus.plexus-utils}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>${version.org.eclipse.aether}</version>
            <scope>provided</scope>
            <!-- Used in maven 3.1.x -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-cli</artifactId>
            <version>${version.org.jboss.as}</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.jboss.as</groupId>
            <artifactId>jboss-as-controller-client</artifactId>
            <version>${version.org.jboss.as}</version>
        </dependency>
        <!--
            This is only added as remoting 3 has some backwards compatibility issues when deploying to newer releases.
            Remove this when AS version aligns the remoting version.
         -->
        <dependency>
            <groupId>org.jboss.remoting3</groupId>
            <artifactId>jboss-remoting</artifactId>
            <version>${version.org.jboss.remoting3}</version>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>${version.org.sonatype.aether}</version>
            <scope>provided</scope>
            <!-- Used in maven 3.0.x -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-util</artifactId>
            <version>${version.org.sonatype.aether}</version>
            <scope>provided</scope>
            <!-- Used in maven 3.0.x -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings-builder</artifactId>
            <version>${version.org.apache.maven.maven-core}</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit.junit}</version>
            <scope>test</scope>
        </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>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <version>${version.org.jboss.arquillian}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-arquillian-container-managed</artifactId>
            <version>${version.org.jboss.as}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${version.org.mockito.mockito-all}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <id>eap</id>
            <properties>
                <eap.url>http://maven.repository.redhat.com/earlyaccess/all/</eap.url>
                <version.eap>6.1</version.eap>
                <jboss.home>${project.build.directory}${file.separator}jboss-eap-${version.eap}</jboss.home>
            </properties>
            <repositories>
                <repository>
                    <id>jboss-eap-repository</id>
                    <url>${eap.url}</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
</project>
