<?xml version='1.0' encoding='UTF-8'?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>maven-plugins</artifactId>
    <groupId>org.apache.maven.plugins</groupId>
    <version>24</version>
    <relativePath>../maven-plugins/pom.xml</relativePath>
  </parent>

  <artifactId>maven-ear-plugin</artifactId>
  <version>2.9</version>
  <packaging>maven-plugin</packaging>

  <name>Apache Maven EAR Plugin</name>
  <description>Generates a J2EE Enterprise Archive (EAR) file.</description>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-ear-plugin-2.9</connection>
    <developerConnection>
      scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-ear-plugin-2.9
    </developerConnection>
    <url>http://svn.apache.org/viewvc/maven/plugins/tags/maven-ear-plugin-2.9</url>
  </scm>
  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.codehaus.org/browse/MEAR</url>
  </issueManagement>
  <distributionManagement>
    <site>
      <id>apache.website</id>
      <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/content/${maven.site.path}</url>
    </site>
  </distributionManagement>

  <contributors>
    <contributor>
      <name>Guillaume Boucherie</name>
    </contributor>
    <contributor>
      <name>Fred Bricon</name>
    </contributor>
    <contributor>
      <name>Steve Moyer</name>
    </contributor>
    <contributor>
      <name>Seth Rife</name>
    </contributor>
    <contributor>
      <name>Laszlo Varadi</name>
    </contributor>
  </contributors>

  <properties>
    <mavenArchiverVersion>2.5</mavenArchiverVersion>
    <mavenFilteringVersion>1.0-beta-2</mavenFilteringVersion>
    <mavenVersion>2.0.6</mavenVersion>
    <mavenPluginVersion>3.2</mavenPluginVersion>
    <maven.site.path>plugins-archives/${project.artifactId}-LATEST</maven.site.path>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-archiver</artifactId>
      <version>${mavenArchiverVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${mavenPluginVersion}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <version>2.4.4</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <version>1.0-alpha-9-stable-1</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.15</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-filtering</artifactId>
      <version>${mavenFilteringVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-verifier</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${mavenPluginVersion}</version>
          <configuration>
            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.10</version>
          <configuration>
            <excludes>
              <!--
                The manifest specification does not describe any method for writing comments into the manifest.
              -->
              <exclude>src/test/resources/projects/project-015/src/main/application/META-INF/MANIFEST.MF</exclude>
              <exclude>src/test/resources/projects/project-016/src/main/ear/MANIFEST.MF</exclude>
              <!--
                DTDs from other sources - do not add our own license header.
              -->
              <exclude>src/test/resources/dtd/application_1_3.dtd</exclude>
              <exclude>src/test/resources/dtd/jboss-app_3_2.dtd</exclude>
              <exclude>src/test/resources/dtd/jboss-app_4_0.dtd</exclude>
              <exclude>src/test/resources/dtd/jboss-app_4_2.dtd</exclude>
              <exclude>src/test/resources/dtd/jboss-app_5_0.dtd</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>generate-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
          <excludes>
            <exclude>**/Abstract*.java</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${mavenPluginVersion}</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>

    <profile>
      <id>run-its</id>
      <properties>
        <localRepositoryPath>${project.build.testOutputDirectory}/m2repo</localRepositoryPath>
      </properties>
      <build>
        <testResources>
          <testResource>
            <directory>src/test/resources</directory>
            <filtering>true</filtering>
            <includes>
              <include>**/pom.xml</include>
            </includes>
          </testResource>
          <testResource>
            <directory>src/test/resources</directory>
            <filtering>false</filtering>
            <excludes>
              <exclude>**/pom.xml</exclude>
            </excludes>
          </testResource>
          <testResource>
            <directory>src/test/filtered-resources</directory>
            <filtering>true</filtering>
          </testResource>
        </testResources>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-resources-plugin</artifactId>
              <configuration>
                <escapeString>\</escapeString>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.8</version>
            <configuration>
              <!-- NOTE: Must be synced with the repo path used by AbstractEarPluginIT -->
              <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
              <goals>
                <goal>clean</goal>
                <goal>package</goal>
              </goals>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <systemPropertyVariables combine.children="append">
                    <maven.home>${maven.home}</maven.home>
                    <userlocalRepository>${settings.localRepository}</userlocalRepository>
                    <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
                    <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
                    <basedirectory>${basedir}</basedirectory>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
