<?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/
-->

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

  <groupId>org.phenotips</groupId>
  <artifactId>phenotips-parent</artifactId>
  <version>1.3-rc-2</version>
  <packaging>pom</packaging>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <name>PhenoTips - Parent POM</name>
  <description>PhenoTips is a software tool providing an easy-to-use Web interface and standardized database back-end for collecting clinical symptoms and physical findings observed in patients with genetic disorders.</description>
  <url>http://phenotips.org/</url>
  <inceptionYear>2011</inceptionYear>

  <licenses>
    <license>
      <name>AGPL 3.0</name>
      <url>https://www.gnu.org/licenses/agpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/phenotips/phenotips.git</connection>
    <developerConnection>scm:git:git@github.com:phenotips/phenotips.git</developerConnection>
    <url>https://github.com/phenotips/phenotips.git/tree/master/</url>
    <tag>phenotips-1.3-rc-2</tag>
  </scm>

  <organization>
    <name>University of Toronto, Computational Biology Lab</name>
    <url>http://compbio.cs.toronto.edu/</url>
  </organization>

  <distributionManagement>
    <site>
      <id>nexus.phenotips.org</id>
      <url>dav:https://nexus.phenotips.org/nexus/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</url>
    </site>
    <repository>
      <id>nexus.phenotips.org</id>
      <name>Maven2 Remote Repository for Releases</name>
      <url>https://nexus.phenotips.org/nexus/content/repositories/releases</url>
    </repository>
    <snapshotRepository>
      <id>nexus.phenotips.org</id>
      <name>Maven2 Development Repository for Snapshots</name>
      <url>https://nexus.phenotips.org/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>phenotips-releases</id>
      <name>PhenoTips Releases repository</name>
      <url>https://nexus.phenotips.org/nexus/content/repositories/releases/</url>
      <releases>
        <enabled>true</enabled>
        <checksumPolicy>fail</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
    </repository>
    <repository>
      <id>phenotips-snapshots</id>
      <name>PhenoTips Snapshots repository</name>
      <url>https://nexus.phenotips.org/nexus/content/repositories/snapshots/</url>
      <releases>
        <enabled>false</enabled>
        <checksumPolicy>fail</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
    </repository>
    <repository>
      <id>phenotips-externals</id>
      <name>PhenoTips external repositories mirror</name>
      <url>https://nexus.phenotips.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>phenotips-externals</id>
      <name>PhenoTips external repositories mirror</name>
      <url>https://nexus.phenotips.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>phenotips-external-snapshots</id>
      <name>PhenoTips external snapshot repositories mirror</name>
      <url>https://nexus.phenotips.org/nexus/content/groups/public-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <phenotips.version>1.3-rc-2</phenotips.version>
    <project.version.previous>1.2</project.version.previous>
    <xwiki.version>7.1.4</xwiki.version>
    <slf4j.version>1.7.22</slf4j.version>
    <poi.version>3.11</poi.version>
    <selenium.version>2.53.1</selenium.version>
    <jackson.codehaus.version>1.9.13</jackson.codehaus.version>
    <jackson.fasterxml.version>2.8.6</jackson.fasterxml.version>
    <restlet.version>2.0.15</restlet.version>
    <buildtools.version>1.6</buildtools.version>
    <testframework.version>1.1</testframework.version>
    <solr.version>5.5.4</solr.version>
    <jaxb2-fluent-api.version>3.0</jaxb2-fluent-api.version>
    <maven-jaxb2-plugin.version>0.12.3</maven-jaxb2-plugin.version>
    <enforcer.skip>false</enforcer.skip>
    <checkstyle.skip>false</checkstyle.skip>
    <clirr.skip>false</clirr.skip>
    <license.skip>false</license.skip>
    <coverage.instructionRatio>1.00</coverage.instructionRatio>

    <!-- Functional test environment -->
    <xwiki.defaultSkin>PhenoTips.Skin</xwiki.defaultSkin>
    <it.pattern>.*</it.pattern>
    <it.patternMethod>.*</it.patternMethod>
    <it.server.directory>${project.build.directory}/package/</it.server.directory>
    <it.server.port>8080</it.server.port>
    <it.server.stopPort>8079</it.server.stopPort>
    <it.server.startCommand>sh start.sh ${it.server.port} ${it.server.stopPort}</it.server.startCommand>
    <it.server.stopCommand>sh stop.sh ${it.server.stopPort}</it.server.stopCommand>
    <it.server.baseURL>http://localhost</it.server.baseURL>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Apache Commons -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.5</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.4</version>
      </dependency>
      <!-- Everybody logs -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>log4j-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <!-- Logging framework -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.1.9</version>
      </dependency>
      <!-- Most plugins depend on the servlet API -->
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.0.1</version>
        <!-- It should always be provided, otherwise containers will complain about it. -->
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.7</version>
      </dependency>
      <!-- JSON serialization and deserialization -->
      <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20160810</version>
      </dependency>
      <!-- Exclude XWiki's Solr search modules -->
      <dependency>
        <groupId>org.xwiki.platform</groupId>
        <artifactId>xwiki-platform-repository-server-api</artifactId>
        <version>${xwiki.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.xwiki.platform</groupId>
            <artifactId>xwiki-platform-search-solr-query</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <!-- HTTP libraries -->
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.5</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpasyncclient</artifactId>
        <version>4.1.2</version>
        <exclusions>
          <exclusion>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>rome</groupId>
        <artifactId>rome</artifactId>
        <version>1.0</version>
        <exclusions>
          <exclusion>
            <!-- We're using the newer org.jdom:jdom -->
            <groupId>jdom</groupId>
            <artifactId>jdom</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <!-- Other commons libraries -->
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.5</version>
      </dependency>
      <!-- Use the latest Selenium version for browser compatibility -->
      <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-api</artifactId>
        <version>${selenium.version}</version>
      </dependency>
      <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-support</artifactId>
        <version>${selenium.version}</version>
      </dependency>
      <!-- Use a more recent version of Jackson 1.x, the latest compatible with the version of restlet in use -->
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>${jackson.codehaus.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>${jackson.codehaus.version}</version>
      </dependency>
      <!-- Use a more recent version of Jackson 2.x -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.fasterxml.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.fasterxml.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.fasterxml.version}</version>
      </dependency>
      <!-- REST -->
      <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>org.restlet.jse</groupId>
        <artifactId>org.restlet</artifactId>
        <version>${restlet.version}</version>
      </dependency>
      <dependency>
        <groupId>org.restlet.jse</groupId>
        <artifactId>org.restlet.ext.jackson</artifactId>
        <version>${restlet.version}</version>
      </dependency>
      <dependency>
        <groupId>org.restlet.jse</groupId>
        <artifactId>org.restlet.ext.jaxrs</artifactId>
        <version>${restlet.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.restlet.jse</groupId>
            <artifactId>org.restlet.lib.org.json</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <!-- TEST -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.10.19</version>
        <scope>test</scope>
      </dependency>
        <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.6.9.Final</version>
      </dependency>
      <!-- Security -->
      <dependency>
        <groupId>org.jasypt</groupId>
        <artifactId>jasypt</artifactId>
        <version>1.9.2</version>
      </dependency>
      <!-- Database connectors for MySQL and HSQLDB, the most commonly used ones. -->
      <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>2.3.4</version>
      </dependency>
      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.40</version>
      </dependency>
      <!-- XWiki dependencies -->
      <!-- Make sure to include the proper version of antlr for hibernate-core -->
      <dependency>
        <groupId>antlr</groupId>
        <artifactId>antlr</artifactId>
        <version>2.7.6</version>
      </dependency>
      <!-- The new version of HTMLCleaner is required for PDFs to work properly -->
      <dependency>
        <groupId>net.sourceforge.htmlcleaner</groupId>
        <artifactId>htmlcleaner</artifactId>
        <version>2.18</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>14.0.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <defaultGoal>install</defaultGoal>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>2.6</version>
      </extension>
      <!-- Adds support for the "functional-tests" packaging -->
      <extension>
        <groupId>org.phenotips</groupId>
        <artifactId>phenotips-functional-tests-lifecycle</artifactId>
        <version>${testframework.version}</version>
      </extension>
      <!-- Adds support for the "xar" packaging -->
      <extension>
        <groupId>org.xwiki.commons</groupId>
        <artifactId>xwiki-commons-tool-xar-handlers</artifactId>
        <version>${xwiki.version}</version>
      </extension>
    </extensions>
    <plugins>
      <!-- Show compiler warnings -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgument>-Xlint:all</compilerArgument>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>

      <plugin>
        <!-- Run Checkstyle -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <!-- Check license headers -->
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <!-- API backwards compatibility check -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <configuration>
          <comparisonVersion>${project.version.previous}</comparisonVersion>
          <!-- List of specific CLIRR excludes.
               See http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html
          -->
          <ignored>
            <!-- Remove the following ignores after we release 1.3 -->
            <difference>
              <className>org/phenotips/vocabulary/VocabularyManager</className>
              <differenceType>7012</differenceType>
              <method>java.util.List getAvailableVocabularies()</method>
              <justification>New method for getting all the vocabularies; it's esential for a Manager to be able to say what it manages.</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/Vocabulary</className>
              <differenceType>7012</differenceType>
              <method>java.lang.String getIdentifier()</method>
              <justification>New methods for better vocabulary identification.</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/Vocabulary</className>
              <differenceType>7012</differenceType>
              <method>java.lang.String getName()</method>
              <justification>New methods for better vocabulary identification.</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/Vocabulary</className>
              <differenceType>7012</differenceType>
              <method>java.lang.String getWebsite()</method>
              <justification>New methods for better vocabulary identification; helps specify the vocabulary's website</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/Vocabulary</className>
              <differenceType>7012</differenceType>
              <method>java.lang.String getCitation()</method>
              <justification>New methods for better vocabulary identification</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/Vocabulary</className>
              <differenceType>7012</differenceType>
              <method>java.util.List search(java.lang.String)</method>
              <justification>New search method for a simpler API</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/VocabularyTerm</className>
              <differenceType>7012</differenceType>
              <method>* getTranslated*(*)</method>
              <justification>New methods for vocabulary term translations</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/SolrVocabularyResourceManager</className>
              <differenceType>7002</differenceType>
              <method>void initialize(java.lang.String)</method>
              <justification>Transformed the class into a singleton</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/SolrVocabularyResourceManager</className>
              <differenceType>7004</differenceType>
              <method>org.xwiki.cache.Cache getTermCache()</method>
              <to>org.xwiki.cache.Cache getTermCache(String)</to>
              <justification>Transformed the class into a singleton</justification>
            </difference>
            <difference>
              <className>org/phenotips/vocabulary/SolrVocabularyResourceManager</className>
              <differenceType>7004</differenceType>
              <method>org.apache.solr.client.solrj.SolrClient getSolrConnection()</method>
              <to>org.apache.solr.client.solrj.SolrClient getSolrConnection(String)</to>
              <justification>Transformed the class into a singleton</justification>
            </difference>

            <difference>
              <className>org/phenotips/data/permissions/PermissionsManager</className>
              <differenceType>7012</differenceType>
              <method>java.util.Collection listAllVisibilityOptions()</method>
              <justification>New methods in support of disabled visibilities.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/permissions/PermissionsManager</className>
              <differenceType>7012</differenceType>
              <method>org.phenotips.data.permissions.Visibility getDefaultVisibility()</method>
              <justification>New API method.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/permissions/Visibility</className>
              <differenceType>7012</differenceType>
              <method>boolean isDisabled()</method>
              <justification>New methods in support of disabled visibilities.</justification>
            </difference>

            <difference>
              <className>**</className>
              <differenceType>7006</differenceType>
              <method>net.sf.json.* toJSON(*)</method>
              <to>org.json.JSONObject</to>
              <justification>Switched from net.sf.json to org.json.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/Patient</className>
              <differenceType>7005</differenceType>
              <method>void updateFromJSON(net.sf.json.JSONObject)</method>
              <to>void updateFromJSON(org.json.JSONObject)</to>
              <justification>Switched from net.sf.json to org.json.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/*</className>
              <differenceType>7005</differenceType>
              <method>*</method>
              <to>*</to>
              <justification>Switched from net.sf.json to org.json.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/**</className>
              <differenceType>7006</differenceType>
              <method>net.sf.json.JSONObject getLocalPatientJSON(java.lang.String, java.lang.String)</method>
              <to>org.json.JSONObject</to>
              <justification>Switched from net.sf.json to org.json.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/receive/**</className>
              <differenceType>7006</differenceType>
              <method>net.sf.json.JSONObject *(*)</method>
              <to>org.json.JSONObject</to>
              <justification>Switched from net.sf.json to org.json.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushPatientData</className>
              <differenceType>7004</differenceType>
              <method>org.phenotips.data.push.PushServerSendPatientResponse sendPatient(org.phenotips.data.Patient, java.util.Set, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushPatientService</className>
              <differenceType>7004</differenceType>
              <method>org.phenotips.data.push.PushServerSendPatientResponse sendPatient(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushPatientService</className>
              <differenceType>7004</differenceType>
              <method>org.phenotips.data.push.PushServerSendPatientResponse sendPatient(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushServerSendPatientResponse</className>
              <differenceType>7012</differenceType>
              <method>boolean isActionFailed_MissingConsent()</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/script/PushPatientScriptService</className>
              <differenceType>7004</differenceType>
              <method>org.phenotips.data.push.PushServerSendPatientResponse sendPatient(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/script/PushPatientScriptService</className>
              <differenceType>7004</differenceType>
              <method>org.phenotips.data.push.PushServerSendPatientResponse sendPatient(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/PatientRepository</className>
              <differenceType>7012</differenceType>
              <method>boolean deletePatient(java.lang.String)</method>
              <justification>Delete patient functionality for script services accessibility.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/PatientDataController</className>
              <differenceType>7004</differenceType>
              <method>void save(org.phenotips.data.Patient)</method>
              <justification>Needed for save optimization</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushServerConfigurationResponse</className>
              <differenceType>7012</differenceType>
              <method>org.json.JSONArray getConsents()</method>
              <justification>Needed for synchronizing consents</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushServerResponse</className>
              <differenceType>7012</differenceType>
              <method>boolean isClientDoesNotAcceptServerProtocolVersion()</method>
              <justification>Better push protocol versioning mechanism</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushServerResponse</className>
              <differenceType>7012</differenceType>
              <method>boolean isServerDoesNotAcceptClientProtocolVersion()</method>
              <justification>Better push protocol versioning mechanism</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushServerResponse</className>
              <differenceType>7002</differenceType>
              <method>boolean isIncorrectProtocolVersion()</method>
              <justification>Better push protocol versioning mechanism</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/shareprotocol/ShareProtocol</className>
              <differenceType>6011</differenceType>
              <field>POST_PROTOCOL_VERSION</field>
              <justification>Renamed to better reflect its meaning</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/shareprotocol/ShareProtocol</className>
              <differenceType>6011</differenceType>
              <field>JSON_RESPONSE_PROTOCOL_VERSION</field>
              <justification>Renamed to better reflect its meaning</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/Feature</className>
              <differenceType>7012</differenceType>
              <method>java.lang.String getPropertyName()</method>
              <justification>New methods for extending pushable data</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/Feature</className>
              <differenceType>7012</differenceType>
              <method>java.util.List getCategories()</method>
              <justification>New methods for extending pushable data</justification>
            </difference>
            <difference>
              <className>org/phenotips/configuration/RecordSection</className>
              <differenceType>7012</differenceType>
              <method>boolean isExpandedByDefault()</method>
              <justification>New methods for configuring which sections should be collapsed and expanded in edit mode by default</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/PatientData</className>
              <differenceType>7012</differenceType>
              <method>boolean containsKey(java.lang.String)</method>
              <justification>Will be used in new controllers</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/permissions/PermissionsManager</className>
              <differenceType>7012</differenceType>
              <method>java.util.* filterByVisibility(java.util.*, org.phenotips.data.permissions.Visibility)</method>
              <justification>Needed for matching notification</justification>
            </difference>
            <difference>
              <className>org/phenotips/security/authorization/AuthorizationModule</className>
              <differenceType>7005</differenceType>
              <method>java.lang.Boolean hasAccess(org.xwiki.users.User, org.xwiki.security.authorization.Right, org.xwiki.model.reference.DocumentReference)</method>
              <to>java.lang.Boolean hasAccess(org.xwiki.users.User, org.xwiki.security.authorization.Right, org.xwiki.model.reference.EntityReference)</to>
              <justification>Made more generic to also be able to deal with spaces</justification>
            </difference>
            <difference>
              <className>org/phenotips/security/authorization/AuthorizationService</className>
              <differenceType>7005</differenceType>
              <method>boolean hasAccess(org.xwiki.users.User, org.xwiki.security.authorization.Right, org.xwiki.model.reference.DocumentReference)</method>
              <to>boolean hasAccess(org.xwiki.users.User, org.xwiki.security.authorization.Right, org.xwiki.model.reference.EntityReference)</to>
              <justification>Made more generic to also be able to deal with spaces</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/permissions/script/SecurePatientAccess</className>
              <differenceType>8001</differenceType>
              <justification>Moved the functionality into an internal package, since script services shouldn't have that much application logic</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/rest/Relations</className>
              <differenceType>8001</differenceType>
              <justification>Moved the functionality into a different module</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/rest/DateTimeAdapter</className>
              <differenceType>8001</differenceType>
              <justification>Moved the functionality into a different module</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/rest/PatientsResource</className>
              <differenceType>7012</differenceType>
              <method>javax.ws.rs.core.Response add(java.lang.String)</method>
              <justification>The method can now add one patient or many patients, renamed from addPatient</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/rest/PatientsResource</className>
              <differenceType>7002</differenceType>
              <method>javax.ws.rs.core.Response addPatient(java.lang.String)</method>
              <justification>The method can now add one patient or many patients, renamed to add</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/permissions/AccessLevel</className>
              <differenceType>7012</differenceType>
              <method>org.xwiki.security.authorization.Right getGrantedRight()</method>
              <justification>New API method bringing XWiki Rights into PhenoTips Permissions.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/permissions/PermissionsManager</className>
              <differenceType>7012</differenceType>
              <method>void fireRightsUpdateEvent(java.lang.String)</method>
              <justification>New way of notifying listeners that permissions on an entity have changed.</justification>
            </difference>
            <difference>
              <className>org/phenotips/data/push/PushServerResponse</className>
              <differenceType>7012</differenceType>
              <method>java.lang.String getServerProtocolVersion()</method>
              <justification>Improved handling of older push server protocol versions.</justification>
            </difference>
          </ignored>
          <excludes>
            <exclude>**/internal/**</exclude>
            <exclude>**/test/**</exclude>
            <!-- Remove the following excludes after we release the current version as final -->
            <exclude>org/phenotips/data/rest/model/*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <!-- We want to force packaging the license resources in the produced XWiki artifacts -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>license-resources</id>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>org.phenotips:phenotips-license-resources:${buildtools.version}</resourceBundle>
              </resourceBundles>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Fail the build if the test coverage is below a given value. -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.9</version>
        <executions>
          <execution>
            <id>jacoco-prepare</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-check</id>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <rule>
              <limits>
                <limit>
                  <counter>INSTRUCTION</counter>
                  <minimum>${coverage.instructionRatio}</minimum>
                </limit>
              </limits>
            </rule>
          </rules>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.xwiki.commons</groupId>
            <artifactId>xwiki-commons-tool-enforcer-dependencies</artifactId>
            <version>${xwiki.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <!-- Check that all Maven plugins have versions defined -->
          <execution>
            <id>enforce-plugins</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requirePluginVersions>
                  <message>Best Practice is to always define plugin versions!</message>
                  <banLatest>false</banLatest>
                  <banRelease>false</banRelease>
                  <banSnapshots>false</banSnapshots>
                </requirePluginVersions>
              </rules>
            </configuration>
          </execution>
          <!-- Check that we're using commons-lang3 and not commons-lang -->
          <execution>
            <id>enforce-commons-lang3</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <searchTransitive>false</searchTransitive>
                  <message>
                    Best practice is to use Commons Lang 3.x
                  </message>
                  <excludes>
                    <exclude>commons-lang:commons-lang</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-no-legacy-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <xwikiBannedDependencies implementation="org.xwiki.tool.enforcer.XWikiBannedDependencies">
                  <searchTransitive>true</searchTransitive>
                  <message>Don't depend on a XWiki Legacy module!</message>
                  <excludes>
                    <exclude>.*xwiki.*:.*-legacy-.*</exclude>
                  </excludes>
                </xwikiBannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <skip>${enforcer.skip}</skip>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>1.4.1</version>
        </plugin>
        <!-- Apply checkstyle rules and fail the build in case of errors. The checkstyle config
             files are taken from the build-tools JAR module.-->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.17</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>6.19</version>
            </dependency>
            <dependency>
              <groupId>org.phenotips</groupId>
              <artifactId>phenotips-checkstyle-configuration</artifactId>
              <version>${buildtools.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <consoleOutput>true</consoleOutput>
            <skip>${checkstyle.skip}</skip>
            <configLocation>checkstyle.xml</configLocation>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- Check license headers and fail the build if they're missing or not matching the defined format -->
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0</version>
          <configuration>
            <skip>${license.skip}</skip>
            <header>license.txt</header>
            <strictCheck>true</strictCheck>
            <headerDefinitions>
              <!-- Our style for XML headers isn't standard so we need to define it in a custom manner.
                   See xwiki-commons-tool-validation-resources module -->
              <headerDefinition>license-xml-definition.xml</headerDefinition>
              <headerDefinition>license-script-definition.xml</headerDefinition>
              <headerDefinition>license-batch-definition.xml</headerDefinition>
            </headerDefinitions>
            <!-- Our Java and XML styles aren't the default so we need to change the mapping -->
            <mapping>
              <java>SLASHSTAR_STYLE</java>
              <aj>SLASHSTAR_STYLE</aj>
            </mapping>
            <!-- We're only interested in checking our sources and our POMs -->
            <!-- At the moment, only check the license headers in Java, XML and shell script files -->
            <!-- FIXME: fix other types of files as well -->
            <includes>
              <include>src/**/*.java</include>
              <include>src/**/*.xml</include>
              <include>src/**/*.bat</include>
              <include>src/**/*.sh</include>
              <include>pom.xml</include>
            </includes>
            <excludes>
              <!-- At the moment we don't have a comment syntax for components.txt files so we need to exclude them
                   from the check -->
              <exclude>**/components.txt</exclude>
              <exclude>**/component-overrides.txt</exclude>
              <!-- Since there's no comment syntax for Maven IT tests's goal.txt file we need to exclude it -->
              <exclude>**/it/**/goals.txt</exclude>
              <exclude>**/goal.txt</exclude>
              <!-- Exclude sample patient records -->
              <exclude>**/P0*.xml</exclude>
              <exclude>**/F0*.xml</exclude>
            </excludes>
            <useDefaultExcludes>false</useDefaultExcludes>
          </configuration>
          <!-- Add a dependency since this is where the maven-license-plugin plugin will find the license.txt file -->
          <dependencies>
            <dependency>
              <groupId>org.phenotips</groupId>
              <artifactId>phenotips-license-verification-resources</artifactId>
              <version>${buildtools.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.5.3</version>
          <configuration>
            <arguments>-Pquick</arguments>
            <!-- Avoid site generation during the release:perform to speed up release process -->
            <goals>deploy</goals>
            <mavenExecutorId>forked-path</mavenExecutorId>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <localCheckout>true</localCheckout>
            <pushChanges>false</pushChanges>
            <tagNameFormat>phenotips-@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.6.1</version>
          <!-- Java 1.7 is required -->
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.19.1</version>
          <!-- Rule is to put tests in *Test classes -->
          <configuration>
            <includes>
              <include>**/*Test.class</include>
            </includes>
            <parallel>classesAndMethods</parallel>
            <threadCount>2</threadCount>
            <systemProperties>
              <property>
                <name>pattern</name>
                <value>${it.pattern}</value>
              </property>
              <property>
                <name>patternMethod</name>
                <value>${it.patternMethod}</value>
              </property>
              <property>
                <name>xwiki.test.baseURL</name>
                <value>${it.server.baseURL}</value>
              </property>
              <property>
                <name>xwiki.test.skipStart</name>
                <value>${it.skipStart}</value>
              </property>
              <property>
                <name>xwikiPort</name>
                <value>${it.server.port}</value>
              </property>
              <property>
                <name>xwikiStopPort</name>
                <value>${it.server.stopPort}</value>
              </property>
              <property>
                <name>xwikiExecutionDirectory</name>
                <value>${it.server.directory}</value>
              </property>
              <property>
                <name>screenshotDirectory</name>
                <value>${basedir}/target/screenshots</value>
              </property>
              <property>
                <name>xwikiExecutionStartCommand</name>
                <value>${it.server.startCommand}</value>
              </property>
              <property>
                <name>xwikiExecutionStopCommand</name>
                <value>${it.server.stopCommand}</value>
              </property>
              <property>
                <name>xwikiWebappName</name>
                <value>phenotips</value>
              </property>
              <property>
                <name>xwikiWebappPath</name>
                <value />
              </property>
            </systemProperties>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.2</version>
          <configuration>
            <!-- Add some useful information about the extension in the manifest file. -->
            <archive>
              <manifestEntries>
                <XWiki-Extension-Id>${project.groupId}:${project.artifactId}</XWiki-Extension-Id>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.0</version>
          <configuration>
            <ignoredUsedUndeclaredDependencies>
              <ignoredUsedUndeclaredDependency>javax.inject:javax.inject</ignoredUsedUndeclaredDependency>
              <ignoredUsedUndeclaredDependency>org.xwiki.commons:xwiki-commons-stability</ignoredUsedUndeclaredDependency>
              <ignoredUsedUndeclaredDependency>org.mockito:mockito-core</ignoredUsedUndeclaredDependency>
              <ignoredUsedUndeclaredDependency>junit:junit</ignoredUsedUndeclaredDependency>
              <ignoredUsedUndeclaredDependency>org.hamcrest:hamcrest-library</ignoredUsedUndeclaredDependency>
            </ignoredUsedUndeclaredDependencies>
            <ignoredUnusedDeclaredDependencies>
              <ignoredUnusedDeclaredDependency>javax.servlet:javax.servlet-api</ignoredUnusedDeclaredDependency>
            </ignoredUnusedDeclaredDependencies>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.0.0</version>
          <configuration>
            <!-- Add some useful information about the extension in the manifest file. -->
            <archive>
              <manifestEntries>
                <XWiki-Extension-Id>${project.groupId}:${project.artifactId}</XWiki-Extension-Id>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.8.2</version>
          <!-- We're deploying to Nexus using the WebDAV protocol -->
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-webdav-jackrabbit</artifactId>
              <version>2.6</version>
            </dependency>
          </dependencies>
          <!-- This doesn't currently work on Jenkins...
          <configuration>
            <deployAtEnd>true</deployAtEnd>
          </configuration>
          -->
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.8</version>
          <executions>
            <execution>
              <id>clirr-check</id>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <comparisonVersion>${clirr.previous.version}</comparisonVersion>
            <skip>${clirr.skip}</skip>
            <!-- The list of excluded files and ignored changes is configured way above, in the <plugins> section. -->
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>2.10.4</version>
          <configuration>
            <!-- Always exclude the internal package since it's not user-public -->
            <excludePackageNames>*.internal.*</excludePackageNames>
            <!-- Make sure javadoc has enough memory -->
            <maxmemory>300m</maxmemory>
            <taglets>
              <taglet>
                <tagletClass>org.phenotips.tools.javadoc.NoteTaglet</tagletClass>
              </taglet>
              <taglet>
                <tagletClass>org.phenotips.tools.javadoc.TodoTaglet</tagletClass>
              </taglet>
              <taglet>
                <tagletClass>org.phenotips.tools.javadoc.FixmeTaglet</tagletClass>
              </taglet>
              <taglet>
                <tagletClass>org.phenotips.tools.javadoc.WarningTaglet</tagletClass>
              </taglet>
            </taglets>
            <tagletArtifact>
              <groupId>${project.groupId}</groupId>
              <artifactId>phenotips-taglets</artifactId>
              <version>${buildtools.version}</version>
            </tagletArtifact>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>3.6</version>
          <!-- Site Plugin doesn't automatically pull the Apache Wagon implementation -->
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-webdav-jackrabbit</artifactId>
              <version>2.6</version>
            </dependency>
          </dependencies>
          <configuration>
            <reportPlugins>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                  <!-- Since contacting the Maven Repositories can take a very long time, tell the plugin not to display
                       the repository locations of the dependencies in the report. -->
                  <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
                <reports>
                  <report>summary</report>
                  <report>index</report>
                  <report>dependencies</report>
                  <report>dependency-convergence</report>
                  <report>mailing-list</report>
                  <report>issue-tracking</report>
                  <report>scm</report>
                </reports>
              </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                  <!-- Always exclude the internal package since it's not user-public -->
                  <excludePackageNames>*.internal.*</excludePackageNames>
                  <!-- Make sure javadoc has enough memory -->
                  <maxmemory>300m</maxmemory>
                </configuration>
                <!-- Don't generate test javadoc -->
                <reports>
                  <report>javadoc</report>
                </reports>
              </plugin>
            </reportPlugins>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.xwiki.commons</groupId>
          <artifactId>xwiki-commons-tool-xar-plugin</artifactId>
          <version>${xwiki.version}</version>
        </plugin>
        <plugin>
          <groupId>org.phenotips</groupId>
          <artifactId>phenotips-packager-maven-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>${testframework.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>1.5.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>1.12</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <!-- Use this ( mvn install -Pquick ) when trying to get a quicker test build, without running any quality control checks. -->
      <id>quick</id>
      <properties>
        <enforcer.skip>true</enforcer.skip>
        <checkstyle.skip>true</checkstyle.skip>
        <clirr.skip>true</clirr.skip>
        <jacoco.skip>true</jacoco.skip>
        <skipTests>true</skipTests>
        <license.skip>true</license.skip>
        <xar.verify.skip>true</xar.verify.skip>
      </properties>
    </profile>

    <profile>
      <!-- Profile used when the release plugin executes. We want javadocs and source jars to be released
           + ensure we sign files using GPG. -->
      <id>release</id>
      <activation>
        <property>
          <!-- This property is automatically defined by the Maven release plugin when executing
               a release. Thus this profile will be automatically enabled when releasing -->
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</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>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <useAgent>true</useAgent>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Test profiles -->
    <profile>
      <id>windows</id>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
      <properties>
        <it.server.startCommand>cmd /c start.bat ${it.server.port} ${it.server.stopPort}</it.server.startCommand>
        <it.server.stopCommand>cmd /c stop.bat ${it.server.stopPort}</it.server.stopCommand>
      </properties>
    </profile>
  </profiles>

  <modules>
    <module>resources</module>
    <module>components</module>
    <module>distribution</module>
  </modules>
</project>
