<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  JRedmine
  %%
  Copyright (C) 2009 - 2010 CodeLutin
  %%
  This program 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 3 of the 
  License, or (at your option) any later version.
  
  This program 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 General Lesser Public License for more details.
  
  You should have received a copy of the GNU General Lesser Public 
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/lgpl-3.0.html>.
  #L%
  -->
<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.nuiton</groupId>
    <artifactId>mavenpom4redmineAndCentral</artifactId>
    <version>3.4.2</version>
  </parent>

  <artifactId>jredmine</artifactId>
  <version>1.5.1</version>

  <name>JRedmine</name>
  <description>JRedmine is a java redmine client</description>
  <inceptionYear>2009</inceptionYear>
  <url>http://maven-site.nuiton.org/jredmine</url>
  <packaging>pom</packaging>

  <developers>

    <developer>
      <name>Tony Chemit</name>
      <id>tchemit</id>
      <email>chemit at codelutin dot com</email>
      <organization>CodeLutin</organization>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>

  </developers>

  <properties>

    <projectId>jredmine</projectId>

    <!-- must be on a fixed version, not on the snapshot to make possible release -->
    <jredminePluginVersion>1.5</jredminePluginVersion>

    <doxiaVersion>1.3</doxiaVersion>

    <!-- documentation is in apt -->
    <siteSourcesType>apt</siteSourcesType>

  </properties>

  <modules>
    <module>jredmine-client</module>
    <module>jredmine-maven-plugin</module>
  </modules>

  <scm>
    <connection>scm:svn:http://svn.nuiton.org/svn/jredmine/tags/jredmine-1.5.1</connection>
    <developerConnection>
      scm:svn:http://svn.nuiton.org/svn/jredmine/tags/jredmine-1.5.1
    </developerConnection>
    <url>http://www.nuiton.org/repositories/browse/jredmine/tags/jredmine-1.5.1</url>
  </scm>

  <distributionManagement>
    <site>
      <id>${platform}</id>
      <url>${our.site.repository}/${projectId}</url>
    </site>
  </distributionManagement>

  <dependencyManagement>

    <dependencies>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>${httpCommonsHttpclientVersion}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${httpCommonsHttpclientVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>${httpCommonsHttpclientVersion}</version>
      </dependency>


      <dependency>
        <groupId>org.nuiton</groupId>
        <artifactId>helper-maven-plugin</artifactId>
        <version>${helperPluginVersion}</version>
        <scope>compile</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact-manager</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-tree</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-profile</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings</artifactId>
          </exclusion>

          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-mail-sender-simple</artifactId>
          </exclusion>

          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-mail-sender-api</artifactId>
          </exclusion>

          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-mail-sender-javamail</artifactId>
          </exclusion>

          <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-velocity</artifactId>
          </exclusion>

          <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
          </exclusion>

          <exclusion>
            <groupId>velocity</groupId>
            <artifactId>velocity</artifactId>
          </exclusion>

        </exclusions>

      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.0.8</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-velocity</artifactId>
        <version>1.1.8</version>
        <exclusions>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
          </exclusion>
          <exclusion>
            <groupId>velocity</groupId>
            <artifactId>velocity</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-i18n</artifactId>
        <version>1.0-beta-10</version>
        <exclusions>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
      </dependency>

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.7</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <!-- dependencies to mojo annotations -->
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${pluginPluginVersion}</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.reporting</groupId>
        <artifactId>maven-reporting-api</artifactId>
        <version>3.0</version>
        <scope>provided</scope>
      </dependency>

      <!--dependency>
        <groupId>org.apache.maven.reporting</groupId>
        <artifactId>maven-reporting-impl</artifactId>
        <version>2.2</version>
      </dependency-->

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-provider-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-lightweight</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh-external</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-webdav-jackrabbit</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-error-diagnostics</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
          </exclusion>

        </exclusions>
      </dependency>

      <!-- doxia -->

      <dependency>
        <groupId>org.apache.maven.doxia</groupId>
        <artifactId>doxia-core</artifactId>
        <version>${doxiaVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.doxia</groupId>
        <artifactId>doxia-site-renderer</artifactId>
        <version>${doxiaVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
          </exclusion>
          <exclusion>
            <groupId>velocity</groupId>
            <artifactId>velocity</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.doxia</groupId>
        <artifactId>doxia-decoration-model</artifactId>
        <version>${doxiaVersion}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.doxia</groupId>
        <artifactId>doxia-sink-api</artifactId>
        <version>${doxiaVersion}</version>
      </dependency>

      <dependency>
        <groupId>org.sonatype.plexus</groupId>
        <artifactId>plexus-sec-dispatcher</artifactId>
        <version>1.4</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.8</version>
        <exclusions>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-velocity</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-mail-sender-simple</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-mail-sender-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-mail-sender-javamail</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-i18n</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4jVersion}</version>
        <scope>runtime</scope>
      </dependency>

      <!-- tests dependencies -->

      <dependency>
        <groupId>org.nuiton</groupId>
        <artifactId>helper-maven-plugin</artifactId>
        <version>${helperPluginVersion}</version>
        <scope>test</scope>
        <classifier>tests</classifier>
        <exclusions>
          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-mail-sender-simple</artifactId>
          </exclusion>
          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-mail-sender-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-mail-sender-javamail</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-tree</artifactId>
          </exclusion>

        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.plugin-testing</groupId>
        <artifactId>maven-plugin-testing-harness</artifactId>
        <version>1.3</version>
        <scope>test</scope>
        <exclusions>

          <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-lightweight</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-file</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
          </exclusion>

          <exclusion>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-api</artifactId>
          </exclusion>

        </exclusions>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>

    <pluginManagement>
      <plugins>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <environmentVariables>
              <jredmine-test.url>${jredmine-test.url}</jredmine-test.url>
              <jredmine-test.username>
                ${jredmine-test.username}
              </jredmine-test.username>
              <jredmine-test.password>
                ${jredmine-test.password}
              </jredmine-test.password>
              <jredmine-test.apiKey>
                ${jredmine-test.apiKey}
              </jredmine-test.apiKey>
              <jredmine-test.verbose>
                ${jredmine-test.verbose}
              </jredmine-test.verbose>
              <jredmine-test.encoding>
                ${jredmine-test.verbose}
              </jredmine-test.encoding>
            </environmentVariables>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>

  </build>

  <profiles>

    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <reporting>
        <plugins>

          <plugin>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>${projectInfoReportsPluginVersion}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>project-team</report>
                  <report>mailing-list</report>
                  <report>cim</report>
                  <report>issue-tracking</report>
                  <report>license</report>
                  <report>scm</report>
                  <report>dependencies</report>
                  <report>dependency-convergence</report>
                  <report>plugin-management</report>
                  <report>plugins</report>
                  <report>dependency-management</report>
                  <report>summary</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadocPluginVersion}</version>
            <configuration>
              <quiet>true</quiet>
              <tagletArtifacts>
                <tagletArtifact>
                  <groupId>org.apache.maven.plugin-tools</groupId>
                  <artifactId>maven-plugin-tools-javadoc</artifactId>
                  <version>${pluginPluginVersion}</version>
                </tagletArtifact>
                <tagletArtifact>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-component-javadoc</artifactId>
                  <version>1.5.5</version>
                </tagletArtifact>
              </tagletArtifacts>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>javadoc</report>
                  <report>test-javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>

    <!-- TC-20100106 Due to cyclic dependency problem between modules,
we do not propagate jredmine-maven-plugin to child modules -->
    <!-- perform only on a release stage when using the maven-release-plugin -->
    <profile>
      <id>redmine-build-release-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <redmine.safe>true</redmine.safe>
      </properties>

      <reporting>
        <plugins>

          <plugin>
            <groupId>org.nuiton.jredmine</groupId>
            <artifactId>jredmine-maven-plugin</artifactId>
            <!--<version>${jredminePluginVersion}</version>-->
            <!-- TC-20100106 Due to cyclic dependency problem between modules,
                 we do not propagate jredmine-maven-plugin to child modules -->
            <inherited>false</inherited>
            <configuration>
              <skipIssueReport>true</skipIssueReport>
              <filtersByCategory>
                <status>3,4,5</status>
              </filtersByCategory>
              <columnNamesByCategory>
                key,summary,status,assignee,tracker,priority,version,createdOn
              </columnNamesByCategory>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>issues-report-by-category</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

        </plugins>
      </reporting>
      <build>

        <plugins>

          <!-- generate the changes.xml from redmine -->
          <plugin>
            <groupId>org.nuiton.jredmine</groupId>
            <artifactId>jredmine-maven-plugin</artifactId>
            <!-- TC-20100106 Due to cyclic dependency problem between modules,
                 we do not propagate jredmine-maven-plugin to child modules -->
            <inherited>false</inherited>
          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- launch this profile after a release:perform on target/checkout -->
    <profile>
      <id>redmine-pre-release-profile</id>
      <activation>
        <property>
          <name>performRedminePreRelease</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <!-- always use this version to perform the profile (to use last improvements) -->
        <jredminePluginVersion>${project.version}</jredminePluginVersion>

      </properties>

    </profile>

    <!-- perform a redmine release after a successfull release -->
    <profile>
      <id>redmine-release-profile</id>
      <activation>
        <property>
          <name>performRedmineRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>
        <!-- always use this version to perform the profile (to use last improvements) -->
        <jredminePluginVersion>${project.version}</jredminePluginVersion>
      </properties>
    </profile>

    <profile>
      <id>jredmine-test-profile</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-redmine-test-login</id>
                <goals>
                  <goal>share-server-secret</goal>
                </goals>
                <phase>initialize</phase>
                <configuration>
                  <serverId>jredmine-test</serverId>
                  <usernameOut>jredmine-test.username</usernameOut>
                  <passwordOut>jredmine-test.password</passwordOut>
                  <privateKeyOut>jredmine-test.apiKey</privateKeyOut>
                  <skipNullValues>true</skipNullValues>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
