<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>maven-plugins</artifactId>
    <groupId>org.apache.maven.plugins</groupId>
    <version>12</version>
  </parent>

  <artifactId>maven-changes-plugin</artifactId>
  <version>2.1</version>
  <packaging>maven-plugin</packaging>

  <name>Maven Changes Report Plugin</name>
  <description>Creates a release history for inclusion into the site and assists in generating an announcement mail.</description>

  <developers>
    <developer>
      <id>jruiz</id>
      <name>Johnny Ruiz III</name>
      <email>jruiz@apache.org</email>
    </developer>
    <developer>
      <id>aramirez</id>
      <name>Allan Ramirez</name>
      <email>aramirez@exist.com</email>
    </developer>
    <developer>
      <id>dennisl</id>
      <name>Dennis Lundberg</name>
      <email>dennisl@apache.org</email>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>Justin Edelson</name>
    </contributor>
  </contributors>

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

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-changes-plugin-2.1</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-changes-plugin-2.1</developerConnection>
    <url>http://svn.apache.org/viewvc/maven/plugins/tags/maven-changes-plugin-2.1</url>
  </scm>
  <issueManagement>
    <system>jira</system>
    <url>http://jira.codehaus.org/browse/MCHANGES</url>
  </issueManagement>
  
  <properties>
    <doxiaVersion>1.0-alpha-11</doxiaVersion>
    <doxiaSitetoolsVersion>1.0-alpha-11</doxiaSitetoolsVersion>
  </properties>

  <dependencies>
    <!-- maven -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>2.0.4</version>
    </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-settings</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-api</artifactId>
      <version>2.0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.reporting</groupId>
      <artifactId>maven-reporting-impl</artifactId>
      <version>2.0.4</version>
    </dependency>

    <!-- plexus -->
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-container-default</artifactId>
      <version>1.0-alpha-9-stable-1</version>
    </dependency>
    <dependency>
      <groupId>plexus</groupId>
      <artifactId>plexus-mail-sender-api</artifactId>
      <version>1.0-alpha-2</version>
      <exclusions>
        <exclusion>
          <groupId>plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>plexus</groupId>
      <artifactId>plexus-mail-sender-javamail</artifactId>
      <version>1.0-alpha-2</version>
      <exclusions>
        <exclusion>
          <groupId>plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>plexus</groupId>
      <artifactId>plexus-mail-sender-simple</artifactId>
      <version>1.0-alpha-2</version>
      <exclusions>
        <exclusion>
          <groupId>plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <!--  forces use of javamail 1.4 since it's the only version available in the repo. We should remove this as soon
        as the dependency in plexus-mail-sender-javamail will be updated
      -->
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>1.4.5</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-velocity</artifactId>
      <version>1.1.7</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>velocity</groupId>
          <artifactId>velocity</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- commons -->
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.0</version>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.0.1</version>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.1.1</version>
    </dependency>

    <!-- doxia -->
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-core</artifactId>
      <version>${doxiaVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-sink-api</artifactId>
      <version>${doxiaVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.doxia</groupId>
      <artifactId>doxia-site-renderer</artifactId>
      <version>${doxiaSitetoolsVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-container-default</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity</artifactId>
      <version>1.5</version>
    </dependency>
    
    <!-- schema validation dependencies : jaxp 1.3 is not included with jdk 1.4 (start with 1.5) -->
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.3.04</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.1</version>
    </dependency>
    
    <!-- trac dependencies -->
    
    <dependency>
      <groupId>org.apache.xmlrpc</groupId>
      <artifactId>xmlrpc-client</artifactId>
      <version>3.0</version>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    
  </dependencies>
    
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.modello</groupId>
        <artifactId>modello-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>site-docs</id>
            <phase>pre-site</phase>
            <goals>
              <goal>xdoc</goal>
              <goal>xsd</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.reporting.outputDirectory}/xsd</outputDirectory>
            </configuration>            
          </execution>
          <execution>
            <id>standard</id>
            <goals>
              <goal>java</goal>
              <goal>xpp3-reader</goal>
              <goal>xpp3-writer</goal>
            </goals>
          </execution>
          <execution>
            <id>generate-xsd</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>xsd</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}/META-INF/changes/xsd</outputDirectory>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <version>1.0.0</version>
          <models>
            <model>src/main/mdo/changes.mdo</model>
          </models>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>create-component-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>merge</id>
            <configuration>
              <output>${project.build.outputDirectory}/META-INF/plexus/components.xml</output>
              <descriptors>
                <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>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${pom.version}</version>
        <configuration>
          <!-- For Announcement -->
          <generateJiraAnnouncement>true</generateJiraAnnouncement>
          <!-- For Changes-report -->
          <xmlPath>${basedir}/src/site/changes/sample-changes.xml</xmlPath>
          <!-- For JIRA-report -->
          <columnNames>Type,Key,Summary,Assignee,Status,Resolution,Fix Version</columnNames>
          <onlyCurrentVersion>true</onlyCurrentVersion>
          <resolutionIds>Closed</resolutionIds>
          <sortColumnNames>Type,Key</sortColumnNames>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
              <report>jira-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.3</version>
            <configuration>
              <debug>true</debug>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
              <goals>
                <goal>clean</goal>
                <goal>site</goal>
              </goals>
              <settingsFile>src/it/settings.xml</settingsFile>
              <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <url>http://maven.apache.org/plugins/maven-changes-plugin-2.1</url>  
  <distributionManagement>
    <site>
      <id>apache.website</id>
      <url>scp://people.apache.org/www/maven.apache.org/plugins/maven-changes-plugin-2.1</url>
    </site>
  </distributionManagement>
</project>
