<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2011 Vincent Behar

   Licensed 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>

  <!-- For deploying to Sonatype OSS Nexus -->
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <!-- Project informations -->
  <groupId>org.rundeck</groupId>
  <artifactId>rundeck-api-java-client</artifactId>
  <version>2.0</version>
  <packaging>jar</packaging>
  <name>RunDeck API - Java Client</name>
  <description>Java client for the RunDeck REST API</description>
  <inceptionYear>2011</inceptionYear>
  <url>http://vbehar.github.com/rundeck-api-java-client</url>
  <scm>
    <url>https://github.com/vbehar/rundeck-api-java-client</url>
    <connection>scm:git:git://github.com/vbehar/rundeck-api-java-client.git</connection>
    <developerConnection>scm:git:git@github.com:vbehar/rundeck-api-java-client.git</developerConnection>
  </scm>
  <distributionManagement>
    <site>
      <id>github-site</id>
      <url>gitsite:git@github.com/vbehar/rundeck-api-java-client.git</url>
    </site>
  </distributionManagement>
  <ciManagement>
    <system>Jenkins</system>
    <url>https://rundeck-api-java-client.ci.cloudbees.com</url>
  </ciManagement>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/vbehar/rundeck-api-java-client/issues</url>
  </issueManagement>
  <mailingLists>
    <mailingList>
      <name>rundeck-discuss</name>
      <subscribe>rundeck-discuss+subscribe@googlegroups.com</subscribe>
      <unsubscribe>rundeck-discuss+unsubscribe@googlegroups.com</unsubscribe>
      <post>rundeck-discuss@googlegroups.com</post>
      <archive>http://groups.google.com/group/rundeck-discuss</archive>
    </mailingList>
  </mailingLists>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>vbehar</id>
      <name>Vincent Behar</name>
    </developer>
  </developers>

  <properties>
    <project.build.sourceJdk>1.6</project.build.sourceJdk>
    <project.build.targetJdk>1.6</project.build.targetJdk>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Plugins version -->
    <plugin.antrun.version>1.6</plugin.antrun.version>
    <plugin.assembly.version>2.2.1</plugin.assembly.version>
    <plugin.changes.version>2.6</plugin.changes.version>
    <plugin.checkstyle.version>2.6</plugin.checkstyle.version>
    <plugin.clean.version>2.4.1</plugin.clean.version>
    <plugin.compiler.version>2.3.2</plugin.compiler.version>
    <plugin.dependency.version>2.3</plugin.dependency.version>
    <plugin.deploy.version>2.6</plugin.deploy.version>
    <plugin.eclipse.version>2.8</plugin.eclipse.version>
    <plugin.enforcer.version>1.0.1</plugin.enforcer.version>
    <plugin.findbugs.version>2.3.2</plugin.findbugs.version>
    <plugin.gpg.version>1.3</plugin.gpg.version>
    <plugin.help.version>2.1.1</plugin.help.version>
    <plugin.install.version>2.3.1</plugin.install.version>
    <plugin.jar.version>2.3.1</plugin.jar.version>
    <plugin.javadoc.version>2.8</plugin.javadoc.version>
    <plugin.jxr.version>2.3</plugin.jxr.version>
    <plugin.pmd.version>2.5</plugin.pmd.version>
    <plugin.project-info-reports.version>2.4</plugin.project-info-reports.version>
    <plugin.release.version>2.2</plugin.release.version>
    <plugin.resources.version>2.5</plugin.resources.version>
    <!-- site 2.3 for maven 2.x and site 3.0-x for maven 3.x -->
    <plugin.site.version>2.3</plugin.site.version>
    <plugin.source.version>2.1.2</plugin.source.version>
    <plugin.surefire.version>2.9</plugin.surefire.version>
    <plugin.taglist.version>2.4</plugin.taglist.version>
    <plugin.versions.version>1.2</plugin.versions.version>
  </properties>

  <build>
    <plugins>
      <!-- IDE configuration -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>
      <!-- compiler configuration -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${project.build.sourceJdk}</source>
          <target>${project.build.targetJdk}</target>
          <encoding>${project.build.sourceEncoding}</encoding>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <!-- site configuration -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-decoration-model</artifactId>
            <version>1.2</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-confluence</artifactId>
            <version>1.2</version>
          </dependency>
        </dependencies>
      </plugin>
      <!-- also build 1 big jar with everything -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>make-archive</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <attach>false</attach>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${plugin.antrun.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${plugin.assembly.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${plugin.checkstyle.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${plugin.clean.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${plugin.compiler.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${plugin.dependency.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${plugin.deploy.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${plugin.eclipse.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${plugin.enforcer.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${plugin.gpg.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-help-plugin</artifactId>
          <version>${plugin.help.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${plugin.install.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${plugin.jar.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${plugin.javadoc.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${plugin.pmd.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>${plugin.release.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${plugin.resources.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${plugin.site.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${plugin.source.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${plugin.surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${plugin.findbugs.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <!-- Needed for the wagon-gitsite : deploy maven site to github pages -->
    <extensions>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-provider-gitexe</artifactId>
        <version>1.3</version>
      </extension>
      <extension>
        <groupId>org.apache.maven.scm</groupId>
        <artifactId>maven-scm-manager-plexus</artifactId>
        <version>1.3</version>
      </extension>
      <extension>
        <groupId>org.kathrynhuxtable.maven.wagon</groupId>
        <artifactId>wagon-gitsite</artifactId>
        <version>0.3.1</version>
      </extension>
    </extensions>
  </build>

  <!-- Reports for the maven site -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${plugin.project-info-reports.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>cim</report>
              <report>dependencies</report>
              <report>distribution-management</report>
              <report>index</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>mailing-list</report>
              <report>project-team</report>
              <report>scm</report>
              <report>summary</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${plugin.javadoc.version}</version>
        <configuration>
          <links>
            <link>http://download.oracle.com/javase/6/docs/api/</link>
          </links>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>${plugin.jxr.version}</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
        <version>${plugin.taglist.version}</version>
        <configuration>
          <tagListOptions>
            <tagClasses>
              <tagClass>
                <displayName>Todo Work</displayName>
                <tags>
                  <tag>
                    <matchString>TODO</matchString>
                    <matchType>ignoreCase</matchType>
                  </tag>
                  <tag>
                    <matchString>FIXME</matchString>
                    <matchType>exact</matchType>
                  </tag>
                </tags>
              </tagClass>
            </tagClasses>
          </tagListOptions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>${plugin.changes.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>${plugin.versions.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
              <report>property-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <comparisonMethod>mercury</comparisonMethod>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${plugin.pmd.version}</version>
        <configuration>
          <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
          <targetJdk>${project.build.targetJdk}</targetJdk>
          <linkXref>true</linkXref>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>${plugin.findbugs.version}</version>
        <configuration>
          <xmlOutput>true</xmlOutput>
          <findbugsXmlOutput>true</findbugsXmlOutput>
          <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>
    <!-- HTTP -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.1.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpmime</artifactId>
      <version>4.1.1</version>
    </dependency>
    <!-- Commons -->
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.0.1</version>
    </dependency>
    <!-- XML Parsing -->
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1.1</version>
    </dependency>
    <!-- Test -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <!-- maven 3 specific configuration -->
      <id>maven-3</id>
      <activation>
        <file>
          <!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <exists>${basedir}</exists>
        </file>
      </activation>
      <properties>
        <plugin.site.version>3.0-beta-3</plugin.site.version>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>

