<?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>16</version>
  </parent>

  <artifactId>maven-assembly-plugin</artifactId>
  <version>2.2-beta-5</version>
  <packaging>maven-plugin</packaging>

  <name>Maven Assembly Plugin</name>
  <description>A Maven 2 plugin to create archives of your project's sources, classes, dependencies etc. from flexible assembly descriptors.</description>

  <prerequisites>
    <maven>2.0.6</maven>
  </prerequisites>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-assembly-plugin-2.2-beta-5</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-assembly-plugin-2.2-beta-5</developerConnection>
    <url>http://svn.apache.org/viewvc/maven/plugins/tags/maven-assembly-plugin-2.2-beta-5</url>
  </scm>
  <issueManagement>
    <system>jira</system>
    <url>http://jira.codehaus.org/browse/MASSEMBLY</url>
  </issueManagement>

  <properties>
    <mdoVersion>1.1.1</mdoVersion>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-common-artifact-filters</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-interpolation</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <version>1.0-alpha-12</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>file-management</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-io</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-filtering</artifactId>
      <version>1.0-beta-2</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-active-collections</artifactId>
      <version>1.0-beta-2</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-io</artifactId>
      <version>1.0-alpha-4</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-archiver</artifactId>
      <version>2.4</version>
    </dependency>
    <!-- FIXME: I'm specifying a dependency on plexus-container-default
                in order to force the version to be compatible with maven
                2.0.5.
    -->
    <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>2.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-repository-builder</artifactId>
      <version>1.0-alpha-2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-plugin-testing-tools</artifactId>
      <version>1.0-alpha-1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-test-tools</artifactId>
      <version>1.0-alpha-1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>easymock</groupId>
      <artifactId>easymockclassextension</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.0-FCS</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>saxpath</groupId>
      <artifactId>saxpath</artifactId>
      <version>1.0-FCS</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>codehaus.org</id>
      <url>http://snapshots.repository.codehaus.org</url>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>codehaus.snapshots</id>
      <url>http://snapshots.repository.codehaus.org</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-maven-plugin</artifactId>
        <version>1.3.8</version>
        <executions>
          <execution>
            <id>create-component-descriptor</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>merge</id>
            <configuration>
              <output>${project.build.outputDirectory}/META-INF/plexus/components.xml</output>
              <descriptors>
                <descriptor>${project.build.outputDirectory}/META-INF/plexus/components.xml</descriptor>
                <descriptor>src/main/resources/META-INF/plexus/components.xml</descriptor>
              </descriptors>
            </configuration>
            <phase>generate-resources</phase>
            <goals>
              <goal>merge-descriptors</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.modello</groupId>
        <artifactId>modello-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <version>${mdoVersion}</version>
        </configuration>
        <executions>
          <execution>
            <id>mdo</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>xpp3-reader</goal>
              <goal>xpp3-writer</goal>
              <goal>java</goal>
              <goal>xsd</goal>
            </goals>
            <configuration>
              <models>
                <model>src/main/mdo/descriptor.mdo</model>
                <model>src/main/mdo/component.mdo</model>
              </models>
            </configuration>
          </execution>
          <execution>
            <id>mdo-site</id>
            <phase>pre-site</phase>
            <goals>
              <goal>xdoc</goal>
              <goal>xsd</goal>
            </goals>
            <configuration>
              <models>
                <model>src/main/mdo/descriptor.mdo</model>
                <model>src/main/mdo/component.mdo</model>
              </models>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <excludes>
              <exclude>**/BasicAbstractAssemblyMojoFeaturesTest*</exclude>
              <exclude>**/AllTests*</exclude>
              <exclude>**/testutils/*</exclude>
            </excludes>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>run-its</id>
      <pluginRepositories>
        <pluginRepository>
          <id>apache.snapshots</id>
          <url>http://repository.apache.org/snapshots</url>
          <releases>
            <enabled>false</enabled>
          </releases>
        </pluginRepository>
      </pluginRepositories>

      <properties>
        <invokerPluginVersion>1.3</invokerPluginVersion>
        <itParent>${java.io.tmpdir}/assembly-ITs/it-project-parent</itParent>
        <itProjects>${java.io.tmpdir}/assembly-ITs/projects</itProjects>
        <localRepositoryPath>${project.build.directory}/local-repository</localRepositoryPath>
        <test.remote.repo.url>file://${project.build.testOutputDirectory}/remote-repository</test.remote.repo.url>
        <it.pomIncludes>**/pom.xml</it.pomIncludes>
        <it.streamLogs>false</it.streamLogs>
        <testVersion>${project.version}</testVersion>
      </properties>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>del-IT-clone-destination</id>
                <phase>package</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete dir="${itProjects}" failonerror="false" />
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${invokerPluginVersion}</version>

            <configuration>
              <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
              <properties>
                <testVersion>${testVersion}</testVersion>
                <localRepositoryPath>${localRepositoryPath}</localRepositoryPath>
                <invokerPluginVersion>${invokerPluginVersion}</invokerPluginVersion>
              </properties>
            </configuration>
            <executions>
              <execution>
                <id>setup-integration-test-env</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <suppressSummaries>true</suppressSummaries>
                  <goals>
                    <goal>install</goal>
                  </goals>
                  <projectsDirectory>src/it/it-project-parent</projectsDirectory>
                  <cloneProjectsTo>${itParent}</cloneProjectsTo>
                  <pomIncludes>
                    <pomInclude>pom.xml</pomInclude>
                  </pomIncludes>
                  <streamLogs>true</streamLogs>
                </configuration>
              </execution>
              <execution>
                <id>integration-test</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <projectsDirectory>src/it/projects</projectsDirectory>
                  <cloneProjectsTo>${itProjects}</cloneProjectsTo>
                  <testPropertiesFile>test.properties</testPropertiesFile>
                  <debug>true</debug>

                  <pomIncludes>
                    <pomInclude>${it.pomIncludes}</pomInclude>
                  </pomIncludes>
                  <streamLogs>${it.streamLogs}</streamLogs>
                  <pomExcludes>
                    <pomExclude>repositories/repo-with-snapshot-parents/pom.xml</pomExclude>

                    <!-- This will be handled by the parent in the bugs/massembly-285 dir. -->
                    <pomExclude>bugs/massembly-285/massembly-285-*/pom.xml</pomExclude>

                    <pomExclude>**/child*/pom.xml</pomExclude>
                    <pomExclude>**/module*/pom.xml</pomExclude>
                    <pomExclude>**/descriptor/pom.xml</pomExclude>
                    <pomExclude>**/handler-def/pom.xml</pomExclude>
                    <pomExclude>**/assembly/pom.xml</pomExclude>
                  </pomExcludes>
                  <postBuildHookScript>verify</postBuildHookScript>
                </configuration>
              </execution>
           </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>2.4.3</version>
      </plugin>
    </plugins>
  </reporting>
</project>