<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2011 Ness Computing, Inc. All rights reserved.

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>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>com.nesscomputing</groupId>
  <artifactId>ness-oss-parent</artifactId>
  <packaging>pom</packaging>
  <version>7</version>
  <name>ness-oss-parent</name>
  <description>This is the parent POM for Ness open source maven projects.</description>
  <url>https://opensource.nesscomputing.com/</url>

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

  <scm>
    <connection>scm:git:git://github.com/NessComputing/ness-oss-parent.git</connection>
    <developerConnection>scm:git:git@github.com:NessComputing/ness-oss-parent.git</developerConnection>
    <url>http://github.com/NessComputing/ness-oss-parent</url>
  </scm>

  <organization>
    <name>Ness Computing, Inc.</name>
    <url>http://www.nesscomputing.com/</url>
  </organization>

  <developers>
    <developer>
      <id>ness</id>
      <name>Ness Computing Open Source Team</name>
      <email>opensource@nesscomputing.com</email>
      <url>http://opensource.nesscomputing.com/</url>
      <timezone>-8</timezone>
    </developer>
  </developers> 

  <properties>
    <!-- see http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.targetJdk>1.6</project.build.targetJdk>
    <ness.build.jvmsize>1024m</ness.build.jvmsize>

    <!-- used in the lifecycle mapping and pluginMgt section. Keep in sync. -->
    <ness.plugins.enforcer.version>1.0.1</ness.plugins.enforcer.version>
    <ness.plugins.dependency-versions-check.version>2.0.2</ness.plugins.dependency-versions-check.version>

    <!-- the current "best" version of maven -->
    <ness.maven.version>3.0.3</ness.maven.version>
    <!-- In Multimodule builds, override this to point at the parent directory for e.g. the license resources. -->
    <!-- See http://stackoverflow.com/questions/6061537/usage-of-maven-basedir-in-multi-module-setup -->
    <ness.root.dir>${project.basedir}</ness.root.dir>
  </properties>

  <prerequisites>
    <maven>${ness.maven.version}</maven>
  </prerequisites>

  <build>
    <pluginManagement>
      <plugins>

        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      org.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-enforcer-plugin
                    </artifactId>
                    <versionRange>
                      [${ness.plugins.enforcer.version},)
                    </versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      com.ning.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-dependency-versions-check-plugin
                    </artifactId>
                    <versionRange>
                      [${ness.plugins.dependency-versions-check.version},)
                    </versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.7</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>

        <!--
            MAVEN-ENFORCER-PLUGIN (The Loving Iron Fist of Maven (TM))
            These artifacts are considered hazardous to your health.
            Each has its own rationale, described below inline.
        -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${ness.plugins.enforcer.version}</version>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <rules>
              <bannedDependencies>
                <!-- Now here is an arcane trick. See http://www.sonatype.com/people/2007/06/how-to-merge-sub-items-from-parent-pom-to-child-pom-in-a-maven-plugin-configuration-2/ for details... -->
                <excludes combine.children="append">
                  <!-- clashes with commons-logging:commons-logging -->
                  <exclude>commons-logging:commons-logging-api</exclude>
                  <!-- clashes with cglib:cglib-nodep -->
                  <exclude>cglib:cglib</exclude>
                  <!-- commons-logging directs to log4j directly.  No need for slf4j -->
                  <exclude>org.slf4j:jcl-over-slf4j</exclude>
                  <!-- junit repackages hamcrest into its own jar, which is a big no-no.
                       junit-dep fixes this problem, so use that instead please! -->
                  <exclude>junit:junit</exclude>
                  <!-- completely and utterly broken -->
                  <exclude>org.weakref:jmxutils:(,1.11]</exclude>
                  <!-- nothing from the old trumpet namespace -->
                  <exclude>io.trumpet.components:*</exclude>
                  <!-- nor can we let out any of our internal things -->
                  <exclude>ness.components:*</exclude>
                  <!-- moved on to com.nesscomputing.* -->
                  <exclude>com.likeness.components:*</exclude>
                </excludes>
              </bannedDependencies>
              <requireMavenVersion>
                <version>${ness.maven.version}</version>
              </requireMavenVersion>
              <requireJavaVersion>
                <version>${project.build.targetJdk}</version>
              </requireJavaVersion>
            </rules>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <failOnWarning>true</failOnWarning>
            <ignoreNonCompile>true</ignoreNonCompile>
          </configuration>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>analyze-only</goal>
                <goal>analyze-duplicate</goal>
                <goal>analyze-dep-mgt</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- Tweak the compiler to use more memory and use UTF-8 for the source code. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>${project.build.targetJdk}</source>
            <target>${project.build.targetJdk}</target>
            <encoding>${project.build.sourceEncoding}</encoding>
            <maxmem>${ness.build.jvmsize}</maxmem>
            <showWarnings>true</showWarnings>
            <compilerArguments>
              <Werror />
            </compilerArguments>
          </configuration>

          <!-- Remove after we move to maven-compiler-plugin 2.4 -->
          <dependencies>
            <dependency>
              <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-compiler-api</artifactId>
              <version>1.8.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-compiler-manager</artifactId>
              <version>1.8.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-compiler-javac</artifactId>
              <version>1.8.2</version>
              <scope>runtime</scope>
              <exclusions>
                <exclusion>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-component-api</artifactId>
                </exclusion>
              </exclusions>
            </dependency>
          </dependencies>
        </plugin>

        <!-- Resource plugins should always use UTF-8 -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>

        <!-- Make sure that we use the latest version of the assembly plugin. Also always use GNU tar mode. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <!-- must be true for our jar-with-dependencies builds -->
            <appendAssemblyId>true</appendAssemblyId>
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <!-- Do NOT upgrade to 2.12, it does not work with the security manager -->
          <version>2.11</version>
          <configuration>
            <systemPropertyVariables combine.children="append">
              <file.encoding>${project.build.sourceEncoding}</file.encoding>
              <sun.jnu.encoding>${project.build.sourceEncoding}</sun.jnu.encoding>
              <user.timezone>UTC</user.timezone>
              <java.awt.headless>true</java.awt.headless>
            </systemPropertyVariables>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <!-- Do NOT upgrade to 2.2.2, fails with GPG plugin and maven 3.0.3 due to MNG-5224 -->
          <version>2.2.1</version>
          <configuration>
            <releaseProfiles>build-javadoc,check-build,check-license-headers,sign-release</releaseProfiles>
            <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.8.1</version>
          <configuration>
            <source>${project.build.targetJdk}</source>
            <target>${project.build.targetJdk}</target>
            <encoding>${project.build.sourceEncoding}</encoding>
            <maxmemory>${ness.build.jvmsize}</maxmemory>
          </configuration>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <phase>verify</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- Always build a jar with the test classes -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
          <executions>
            <execution>
              <id>attach-tests</id>
              <phase>package</phase>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addClasspath>false</addClasspath>
              </manifest>
            </archive>
          </configuration>
        </plugin>

        <!-- bundle up source code into jars for both the main and the test sources -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.1.2</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>package</phase>
              <goals>
                <goal>jar-no-fork</goal>
                <goal>test-jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>com.ning.maven.plugins</groupId>
          <artifactId>maven-duplicate-finder-plugin</artifactId>
          <version>1.0.3</version>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <exceptions combine.children="append">
              <exception>
                <conflictingDependencies>
                  <dependency>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                  </dependency>
                  <dependency>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils-core</artifactId>
                  </dependency>
                  <dependency>
                    <groupId>commons-collections</groupId>
                    <artifactId>commons-collections</artifactId>
                  </dependency>
                </conflictingDependencies>
                <classes>
                  <class>org.apache.commons.collections.ArrayStack</class>
                  <class>org.apache.commons.collections.Buffer</class>
                  <class>org.apache.commons.collections.BufferUnderflowException</class>
                  <class>org.apache.commons.collections.FastHashMap</class>
                </classes>
              </exception>
              <exception>
                <conflictingDependencies>
                  <dependency>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils</artifactId>
                  </dependency>
                  <dependency>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils-core</artifactId>
                  </dependency>
                </conflictingDependencies>
                <packages>
                  <package>org.apache.commons.beanutils</package>
                </packages>
              </exception>
              <exception>
                <conflictingDependencies>
                  <dependency>
                    <groupId>org.apache.activemq</groupId>
                    <artifactId>activemq-core</artifactId>
                  </dependency>
                  <dependency>
                    <groupId>org.apache.activemq.protobuf</groupId>
                    <artifactId>activemq-protobuf</artifactId>
                  </dependency>
                </conflictingDependencies>
                <packages>
                  <package>org.apache.activemq.protobuf</package>
                </packages>
              </exception>
            </exceptions>
            <ignoredResources combine.children="append">
              <!-- to be found in the jetty jars -->
              <ignoredResource>about\.html</ignoredResource>
              <!-- jersey-core, jersey-server -->
              <ignoredResource>META-INF/jersey-module-version</ignoredResource>
            </ignoredResources>
          </configuration>
        </plugin>

        <plugin>
          <groupId>com.ning.maven.plugins</groupId>
          <artifactId>maven-dependency-versions-check-plugin</artifactId>
          <version>${ness.plugins.dependency-versions-check.version}</version>
          <configuration>
            <failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
          </configuration>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.4.0</version>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <targetJdk>${project.build.targetJdk}</targetJdk>
          </configuration>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>1.9.0</version>
          <inherited>true</inherited>
          <configuration>
            <header>${ness.root.dir}/src/ness/LICENSE-HEADER.txt</header>
            <aggregate>true</aggregate>
            <failIfMissing>true</failIfMissing>
            <encoding>${project.build.sourceEncoding}</encoding>
            <excludes>
              <exclude>.hg*</exclude>
              <exclude>.git*</exclude>
              <exclude>**/*.md</exclude>
              <exclude>**/*.sh</exclude>
              <exclude>**/*.txt</exclude>
              <exclude>**/*.releaseBackup</exclude>
            </excludes>
            <includes>
              <include>src/**</include>
              <include>pom.xml</include>
            </includes>
            <strictCheck>true</strictCheck>
          </configuration>
          <executions>
            <execution>
              <id>default</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.4</version>
          <configuration>
            <useAgent>true</useAgent>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>-Djava.security.manager=com.nesscomputing.testing.lessio.LessIOSecurityManager</argLine>
        </configuration>
      </plugin>

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

    </plugins>
  </build>

  <!-- Contains a number of "global" dependencies that should never change across our code base. -->
  <dependencyManagement>
    <dependencies>
      <!-- Google Guice -->
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>3.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-servlet</artifactId>
        <version>3.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-assistedinject</artifactId>
        <version>3.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-multibindings</artifactId>
        <version>3.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject.extensions</groupId>
        <artifactId>guice-throwingproviders</artifactId>
        <version>3.0</version>
      </dependency>

      <!-- Guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>11.0.1</version>
      </dependency>

      <!-- Joda -->
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.0</version>
      </dependency>

      <!-- config-magic -->
      <dependency>
        <groupId>org.skife.config</groupId>
        <artifactId>config-magic</artifactId>
        <version>0.13</version>
      </dependency>

      <!-- slf4j -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.4</version>
      </dependency>

      <!-- Apache commons components -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.1</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>commons-configuration</groupId>
        <artifactId>commons-configuration</artifactId>
        <version>1.7</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.6</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.1</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.1</version>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.8.3</version>
      </dependency>

      <!-- findbugs -->
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>2.0.0</version>
      </dependency>

      <!-- Java APIs -->
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
      </dependency>

      <!-- Testing -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit-dep</artifactId>
        <version>4.10</version>
      </dependency>
      <dependency>
        <groupId>org.easymock</groupId>
        <artifactId>easymock</artifactId>
        <version>3.1</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.2.1</version>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>1.2.1</version>
      </dependency>
      <dependency>
        <groupId>org.objenesis</groupId>
        <artifactId>objenesis</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>com.nesscomputing.testing</groupId>
        <artifactId>kawala-lessio</artifactId>
        <version>1.0.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>com.nesscomputing.testing</groupId>
      <artifactId>kawala-lessio</artifactId>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>build-javadoc</id>
      <activation>
        <property>
          <name>build-javadoc</name>
        </property>
      </activation>
      <build>
        <plugins>
          <!-- oss requires a javadoc jar. Build one when releasing. -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>check-build</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <property>
          <name>check-build</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
          </plugin>

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

          <plugin>
            <groupId>com.ning.maven.plugins</groupId>
            <artifactId>maven-dependency-versions-check-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>com.ning.maven.plugins</groupId>
            <artifactId>maven-duplicate-finder-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>check-license-headers</id>
      <activation>
        <property>
          <name>check-license-headers</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>sign-release</id>
      <activation>
        <property>
          <name>sign-release</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
