<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2009-2013 Roland Huss
  ~
  ~ 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jolokia</groupId>
  <artifactId>jolokia</artifactId>
  <version>1.6.2</version>
  <name>jolokia-parent</name>
  <description>jolokia parent pom</description>

  <packaging>pom</packaging>

  <url>http://www.jolokia.org</url>

  <modules>
    <module>agent</module>
    <module>it</module>
    <module>client</module>
    <module>tools/test-util</module>
  </modules>

  <build>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <meminitial>128m</meminitial>
          <maxmem>512m</maxmem>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/dist-bin.xml</descriptor>
            <descriptor>src/assembly/dist-source.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <goals>deploy docbkx:generate-html docbkx:generate-pdf package assembly:assembly</goals>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.agilejava.docbkx</groupId>
        <artifactId>docbkx-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>docbkx-html</id>
            <goals>
              <goal>generate-html</goal>
            </goals>
            <phase>pre-site</phase>
          </execution>
          <execution>
            <id>docbkx-pdf</id>
            <goals>
              <goal>generate-pdf</goal>
            </goals>
            <configuration>
              <imgSrcPath>file:///${project.basedir}/src/docbkx/images/</imgSrcPath>
            </configuration>
            <phase>pre-site</phase>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.docbook</groupId>
            <artifactId>docbook-xml</artifactId>
            <version>4.4</version>
            <scope>runtime</scope>
          </dependency>
        </dependencies>
        <configuration>
          <includes>index.xml</includes>
          <xincludeSupported>true</xincludeSupported>
          <tableBordersWithCss>true</tableBordersWithCss>
          <imgSrcPath>images/</imgSrcPath>
          <foCustomization>src/docbkx/styles/reference-pdf.xsl</foCustomization>
          <htmlStylesheet>css/stylesheet.css</htmlStylesheet>
          <!-- produce single-page html output -->
          <chunkedOutput>true</chunkedOutput>
          <highlightSource>1</highlightSource>
          <htmlCustomization>src/docbkx/styles/reference-html-chunk.xsl</htmlCustomization>
          <entities>
            <entity>
              <name>version</name>
              <value>${project.version}</value>
            </entity>
          </entities>
          <postProcess>
            <copy todir="${project.basedir}/target/site/reference">
              <fileset dir="${project.basedir}/target/docbkx">
                <include name="**/*.html" />
                <include name="**/*.pdf" />
              </fileset>
            </copy>
            <copy todir="${project.basedir}/target/site/reference/html">
              <fileset dir="${project.basedir}/src/docbkx">
                <include name="**/*.css" />
                <include name="**/*.png" />
                <include name="**/*.gif" />
                <include name="**/*.jpg" />
              </fileset>
            </copy>
            <move file="${project.basedir}/target/site/reference/pdf/index.pdf" tofile="${project.basedir}/target/site/reference/pdf/jolokia-reference.pdf" failonerror="false" />
          </postProcess>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*.java</include>
          </includes>
          <excludeSubProjects>false</excludeSubProjects>
        </configuration>
      </plugin>
    </plugins>


    <!-- ===========================================================  -->

    <!-- plugin versions -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.3.7</version>
          <configuration>
            <groupId>${project.groupId}</groupId>
            <artifactId>${project.artifactId}</artifactId>
            <version>${project.version}</version>
            <packaging>${project.packaging}</packaging>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.9</version>
        </plugin>

        <plugin>
          <groupId>com.agilejava.docbkx</groupId>
          <artifactId>docbkx-maven-plugin</artifactId>
          <version>2.0.6</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>

        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-scr-plugin</artifactId>
          <version>1.15.0</version>
        </plugin>

        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <archive>
              <addMavenDescriptor>true</addMavenDescriptor>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.5</version>
        </plugin>

        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.18.1</version>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>

        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.7</version>
        </plugin>

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
          <configuration>
            <validate>false</validate>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.7</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.11</version>
        </plugin>

        <plugin>
          <groupId>com.github.github</groupId>
          <artifactId>site-maven-plugin</artifactId>
          <version>0.12</version>
        </plugin>

      </plugins>
    </pluginManagement>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>2.7</version>
      </extension>
    </extensions>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-convergence</report>
              <report>dependency-management</report>
              <report>project-team</report>
              <report>cim</report>
              <report>issue-tracking</report>
              <report>scm</report>
              <report>plugins</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.11</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>

  </reporting>

  <!-- ===========================================================  -->
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/rhuss/jolokia/issues/</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git://github.com/rhuss/jolokia.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/rhuss/jolokia.git</developerConnection>
    <tag>v1.6.2</tag>
    <url>git://github.com/rhuss/jolokia.git</url>
  </scm>

  <ciManagement>
    <system>jenkins</system>
    <url>https://travis-ci.org/rhuss/jolokia</url>
  </ciManagement>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Roland Huss</name>
      <id>roland</id>
      <email>roland@jolokia.org</email>
      <url>https://github.com/rhuss</url>
      <roles>
        <role>Developer, Architect</role>
      </roles>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Greg Bowyer</name>
      <email>gbowyer@fastmail.co.uk</email>
      <url>https://github.com/GregBowyer</url>
    </contributor>
    <contributor>
      <name>Arnab Biswas</name>
      <email>arnabbiswas1@outlook.com</email>
      <url>https://github.com/arnabbiswas1</url>
    </contributor>
    <contributor>
      <name>Benson Margulies</name>
      <email>benson@basistech.com</email>
      <url>https://github.com/benson-basis</url>
    </contributor>
    <contributor>
      <name>Hiram Chirino</name>
      <email>hiram@hiramchirino.com</email>
      <url>https://github.com/chirino</url>
    </contributor>
    <contributor>
      <name>Tom McMillen</name>
      <email>tgmcmillen@yahoo.co.uk</email>
      <url>https://github.com/cymantic</url>
    </contributor>
    <contributor>
      <name>Dejan Bosanac</name>
      <url>https://github.com/dejanb</url>
    </contributor>
    <contributor>
      <name>Alex Coomans</name>
      <email>alex@alexcoomans.com</email>
      <url>https://github.com/drcapulet</url>
    </contributor>
    <contributor>
      <name>elnkwelch</name>
      <url>https://github.com/elnkwelch</url>
    </contributor>
    <contributor>
      <name>Georgy Bolyuba</name>
      <email>georgy@bolyuba.com</email>
      <url>https://github.com/georgy</url>
    </contributor>
    <contributor>
      <name>Hemant Kumar</name>
      <email>hemant@codemancers.com</email>
      <url>https://github.com/gnufied</url>
    </contributor>
    <contributor>
      <name>Gerald Quintana</name>
      <email>gerald.quintana@gmail.com</email>
      <url>https://github.com/gquintana</url>
    </contributor>
    <contributor>
      <name>Jochen Cordes</name>
      <url>https://github.com/jcordes73</url>
    </contributor>
    <contributor>
      <name>Jürgen Hermann</name>
      <url>https://github.com/jhermann</url>
    </contributor>
    <contributor>
      <name>jpamador</name>
      <url>https://github.com/jpamador</url>
    </contributor>
    <contributor>
      <name>James Strachan</name>
      <email>james.strachan@gmail.com</email>
      <url>https://github.com/jstrachan</url>
    </contributor>
    <contributor>
      <name>Khai Nguyen</name>
      <url>https://github.com/khaing211</url>
    </contributor>
    <contributor>
      <name>Maros Marsalek</name>
      <email>maros.mars@gmail.com</email>
      <url>https://github.com/marosmars</url>
    </contributor>
    <contributor>
      <name>Martin Vitez</name>
      <url>https://github.com/matejj</url>
    </contributor>
    <contributor>
      <name>mikael</name>
      <url>https://github.com/Mikael</url>
    </contributor>
    <contributor>
      <name>Michael Richards</name>
      <url>https://github.com/mjr5749</url>
    </contributor>
    <contributor>
      <name>Neven Radovanović</name>
      <url>https://github.com/nevenr</url>
    </contributor>
    <contributor>
      <name>ogis-nakagawa</name>
      <email>Nakagawa_Michio@ogis-ri.co.jp</email>
      <url>https://github.com/ogis-nakagawa</url>
    </contributor>
    <contributor>
      <name>Robert Gründler</name>
      <email>robert@dubture.com</email>
      <url>https://github.com/pulse00</url>
    </contributor>
    <contributor>
      <name>Roland Mai</name>
      <email>roland.mai@gmail.com</email>
      <url>https://github.com/roland</url>
    </contributor>
    <contributor>
      <name>Ryan Goulding</name>
      <email>ryandgoulding@gmail.com</email>
      <url>https://github.com/ryandgoulding</url>
    </contributor>
    <contributor>
      <name>Senthil Supramaniam</name>
      <url>https://github.com/senthilnest</url>
    </contributor>
    <contributor>
      <name>Stephan Beal</name>
      <email>sgbeal@googlemail.com</email>
      <url>https://github.com/sgbeal</url>
    </contributor>
    <contributor>
      <name>Jean-Philippe Melanson</name>
      <url>https://github.com/srirachapills</url>
    </contributor>
    <contributor>
      <name>Tadayoshi Sato</name>
      <url>https://github.com/tadayosi</url>
    </contributor>
    <contributor>
      <name>Gareth Davis</name>
      <email>gareth.davis@mac.com</email>
      <url>https://github.com/tempredirect</url>
    </contributor>
    <contributor>
      <name>Tokuhiro Matsuno</name>
      <url>https://github.com/tokuhirom</url>
    </contributor>
    <contributor>
      <name>twhite</name>
      <url>https://github.com/twhite</url>
    </contributor>
    <contributor>
      <name>Maciek Sakrejda</name>
      <email>m.sakrejda@gmail.com</email>
      <url>https://github.com/uhoh-itsmaciek</url>
    </contributor>
    <contributor>
      <name>Zisis Lianas</name>
      <url>https://github.com/zisisli</url>
    </contributor>
  </contributors>

  <!-- Overall version management -->
  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.4</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1.1</version>
        <exclusions>
          <!-- That's a bug in json-simple that junit is referenced without scope test -->
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.core</artifactId>
        <version>4.2.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.compendium</artifactId>
        <version>4.2.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8.8</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>3.0</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jmockit</groupId>
        <artifactId>jmockit</artifactId>
        <version>1.8</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty</artifactId>
        <version>6.1.26</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <currentStableVersion>1.6.2</currentStableVersion>
    <currentSnapshotVersion>1.6.3-SNAPSHOT</currentSnapshotVersion>
    <github.global.server>github</github.global.server>
  </properties>

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>
        http://oss.sonatype.org/content/repositories/snapshots
      </url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>
        https://oss.sonatype.org/service/local/staging/deploy/maven2/
      </url>
    </repository>
  </distributionManagement>

  <profiles>
    <profile>
      <!-- Distribution to maven central. This is default deployment target -->
      <id>dist</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <useAgent>true</useAgent>
              <keyname>roland@jolokia.org</keyname>
            </configuration>
          </plugin>

          <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <configuration>
              <message>Creating site for Jolokia ${project.version}</message>
              <server>jolokia-site</server>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>site</goal>
                </goals>
                <phase>site</phase>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>

    <!-- Enable JaCoCo Test-->
    <profile>
      <id>jacoco</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.7.6.201602180812</version>
            <executions>
              <execution>
                <id>jacoco-initialize</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>jacoco-site</id>
                <phase>package</phase>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- Profile for running only Java 5 compliant tests-->
    <profile>
      <id>java5</id>
      <activation>
        <jdk>1.5</jdk>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <excludedGroups>java6</excludedGroups>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

    <profile>
      <id>disable-javadoc-lint</id>
      <activation>
        <jdk>[1.8,2.0)</jdk>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.10.1</version>
              <configuration>
                <additionalparam>-Xdoclint:none</additionalparam>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

    <!-- Include Roo, which is not build by default -->
    <profile>
      <id>roo</id>
      <modules>
        <module>tools/roo-addon</module>
      </modules>
    </profile>

  </profiles>
</project>
