<!-- ********************************************************* -->
<!-- **              Alfresco Parent POM                    ** -->
<!-- ********************************************************* -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.alfresco</groupId>
    <artifactId>alfresco-super-pom</artifactId>
    <version>6</version>
  </parent>
  <artifactId>alfresco-parent</artifactId>
  <packaging>pom</packaging>
  <version>5.2.a-EA</version>
  <name>Alfresco</name>

  <licenses>
    <license>
      <name>${maven.license.name}</name>
      <url>${maven.license.url}</url>
    </license>
  </licenses>
  <scm>
    <connection>${maven.scm.connection}</connection>
    <developerConnection>${maven.scm.developerConnection}</developerConnection>
    <url>${maven.scm.url}</url>
  </scm>
  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.alfresco.com/jira/browse/ALF</url>
  </issueManagement>
  <ciManagement>
    <system>Bamboo</system>
    <url>https://bamboo.alfresco.com/bamboo/browse/ALF</url>
  </ciManagement>

  <repositories>
    <repository>
      <id>alfresco-public</id>
      <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <!-- Used to download bcel 6.0-RC3 - see ACE-3667 -->
    <pluginRepository>
      <id>alfresco-public</id>
      <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <distributionManagement>
      <repository>
          <id>alfresco-internal</id>
          <url>https://artifacts.alfresco.com/nexus/content/repositories/internal-staging</url>
      </repository>
      <snapshotRepository>
          <id>alfresco-internal-snapshots</id>
          <url>${maven.distributionManagement.snapshot.url}</url>
      </snapshotRepository>
  </distributionManagement>

  <modules>
    <module>projects/3rd-party</module>
    <module>projects/data-model</module>
    <module>projects/dev-tomcat</module>
    <module>projects/legacy-lucene</module>
    <module>projects/mbeans</module>
    <module>projects/repository</module>
    <module>projects/remote-api</module>
    <module>projects/web-client</module>
    <module>projects/solr-client</module>
    <module>projects/solr4</module>
    <module>projects/solr</module>
    <module>projects/file-transfer-receiver</module>
    <module>projects/system-build-test</module>
    <module>modules/sharepoint/amp</module>
    <module>projects/mmt</module>
    <module>projects/sdk/alfresco-platform-distribution</module>
    <module>projects/server-root</module>
  </modules>

  <properties>
    <!-- Developer's runtime environment configuration -->
    <runtime.parent.folder>${basedir}/../..</runtime.parent.folder>
    <runtime.data.folder>${runtime.parent.folder}/runtime</runtime.data.folder>
    <runtime.tomcat.conf.folder>${runtime.parent.folder}/tomcat</runtime.tomcat.conf.folder>
    <runtime.solr.folder>${runtime.data.folder}/solr4-instance</runtime.solr.folder>
    <alfresco.properties.file>${runtime.tomcat.conf.folder}/shared/classes/alfresco-global.properties</alfresco.properties.file>
    <!-- Define the location where alfresco will store its content files, i.e. *.bin) -->
    <dir.root>${runtime.data.folder}/alf_data</dir.root>

    <tomcat.default.alfresco.port>8080</tomcat.default.alfresco.port>
    <tomcat.default.alfresco.ssl.port>8443</tomcat.default.alfresco.ssl.port>
    <tomcat.default.solr.port>8082</tomcat.default.solr.port>
    <tomcat.default.solr.ssl.port>8445</tomcat.default.solr.ssl.port>
    <tomcat.default.solr4.port>8083</tomcat.default.solr4.port>
    <tomcat.default.solr4.ssl.port>8446</tomcat.default.solr4.ssl.port>

    <!-- Skip database drop/create by default -->
    <db.skip>true</db.skip>
    <test.working.dir>${project.build.directory}</test.working.dir>
    <img.exe>convert</img.exe>
    <index.subsystem.name>buildonly</index.subsystem.name>

    <!-- Maven specific build properties -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.build.sourceVersion>1.8</maven.build.sourceVersion>

    <!-- Arguments for test execution in surefire -->
    <!-- (Disable assertions in Chemistry OpenCMIS, until their TCK is fixed) -->
    <argLine>-Xmx2G -Duser.language=en -Dcom.sun.management.jmxremote -da:org.apache.lucene.analysis.TokenStream -da:org.apache.chemistry.opencmis...</argLine>

    <!-- Community build specific properties -->
    <maven.scm.connection>scm:svn:http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD</maven.scm.connection>
    <maven.scm.developerConnection>scm:svn:https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD</maven.scm.developerConnection>
    <maven.scm.url>https://fisheye.alfresco.com/changelog/alfresco-enterprise</maven.scm.url>
    <maven.repository.url>https://artifacts.alfresco.com/nexus/content/groups/public</maven.repository.url>
    <maven.distributionManagement.snapshot.url>https://artifacts.alfresco.com/nexus/content/repositories/snapshots</maven.distributionManagement.snapshot.url>
    <maven.license.name>GNU Lesser General Public License v3.0 or later</maven.license.name>
    <maven.license.url>http://www.gnu.org/licenses/lgpl-3.0-standalone.html</maven.license.url>
    <licenseName>community</licenseName>

    <!-- Default location of the root of the checkout. To be overriden if project is deeper than 2 levels -->
    <highest.basedir>${basedir}/../..</highest.basedir>

    <!-- Centralized dependency versions -->
    <dependency.lucene.version>2.4.1</dependency.lucene.version>
    <dependency.truezip.version>7.7.9</dependency.truezip.version>
    <dependency.jibx.version>1.2.6</dependency.jibx.version>
    <dependency.tika.version>1.6-20160412-alfresco-patched</dependency.tika.version>
    <dependency.vorbisJava.version>0.4</dependency.vorbisJava.version>
    <dependency.opencmis.version>0.11.0</dependency.opencmis.version>
    <dependency.antlr.version>3.5.2</dependency.antlr.version>
    <dependency.spring.version>3.2.14.RELEASE</dependency.spring.version>
    <dependency.tomcat.version>7.0.59</dependency.tomcat.version>
    <dependency.activiti.version>5.19.0.1</dependency.activiti.version>
    <dependency.activiti-engine.version>5.19.0.1</dependency.activiti-engine.version>
    <dependency.jackson2.version>2.3.2</dependency.jackson2.version>
    <dependency.poi.version>3.10.1-20151016-alfresco-patched</dependency.poi.version>
    <dependency.yui.version>2.9.0-alfresco-20141223</dependency.yui.version>
    <dependency.alfresco-authorised-users.version>5.2.0.2</dependency.alfresco-authorised-users.version>
    <dependency.webscripts.version>6.7</dependency.webscripts.version>
    <dependency.alfresco-core.version>6.3</dependency.alfresco-core.version>
    <dependency.alfresco-jlan.version>6.2</dependency.alfresco-jlan.version>
    <dependency.alfresco-sdk.version>2.0.0</dependency.alfresco-sdk.version>
    <dependency.httpcomponents.version>4.5.1</dependency.httpcomponents.version>
    <dependency.api-explorer.version>1.1-SNAPSHOT</dependency.api-explorer.version>

    <!-- Alfresco Office Services Module -->
    <alfresco.aos-module.version>1.1</alfresco.aos-module.version>

    <!-- Versions of binaries packaged in the installer -->
    <installer.common.version>5.1-20151118</installer.common.version>
    <installer.tomcat.version>${dependency.tomcat.version}-alfresco-distribution</installer.tomcat.version>
    <installer.java.version>1.8.0_65</installer.java.version>
    <installer.postgresql.version>9.4.4-20151016</installer.postgresql.version>
    <installer.libreoffice.version>4.4.5-20151016</installer.libreoffice.version>
    <installer.ghostscript.version>8.64</installer.ghostscript.version>
    <installer.imagemagick.version>6.9.1</installer.imagemagick.version>

    <!-- Install builder version -->
    <installer.installbuilder.version>15.10.1</installer.installbuilder.version>

    <!-- Installer version that will be used in the final name -->
    <installer.version.name>${project.version}</installer.version.name>
    <installer.manager.version>1.0</installer.manager.version>
  </properties>

  <!-- Define versions of very common components -->
  <dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.10.19</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-xmlfactory</artifactId>
            <version>1.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.chemistry.opencmis</groupId>
            <artifactId>chemistry-opencmis-client-impl</artifactId>
            <version>${dependency.opencmis.version}</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
            <version>${dependency.webscripts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
            <version>${dependency.webscripts.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts-api</artifactId>
            <version>${dependency.webscripts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-surf-core-configservice</artifactId>
            <version>${dependency.webscripts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-core</artifactId>
            <version>${dependency.alfresco-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-core</artifactId>
            <classifier>tests</classifier>
            <version>${dependency.alfresco-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-jlan-embed</artifactId>
            <version>${dependency.alfresco-jlan.version}</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.10.0-alfresco-patched</version>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.2-alfresco</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.4.01</version>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20090211</version>
        </dependency>
        <!-- Use patched FreeMarker to fix ALF-10188 -->
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.20-alfresco-patched</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.8.1</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.13</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.13</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.2</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4-DBCP330</version>
        </dependency>
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.5</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1-HTTPCLIENT-1265</version>
        </dependency>
        <dependency>
            <groupId>commons-el</groupId>
            <artifactId>commons-el</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>commons-jxpath</groupId>
            <artifactId>commons-jxpath</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>commons-modeler</groupId>
            <artifactId>commons-modeler</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>3.3</version>
        </dependency>
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.4.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
            <version>1.2.15</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-impl</artifactId>
            <version>1.2.15</version>
        </dependency>
        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
            <version>4.0.4</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>2.2.6</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.2.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-api</artifactId>
            <version>1.1.8</version>
        </dependency>
        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-impl</artifactId>
            <version>1.1.8</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${dependency.postgresql.version}</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${dependency.mysql.version}</version>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.187</version>
        </dependency>
		<dependency>
            <groupId>net.lightbody.bmp</groupId>
            <artifactId>browsermob-core-littleproxy</artifactId>
            <version>2.1.0-beta-1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.lightbody.bmp</groupId>
            <artifactId>browsermob-proxy</artifactId>
            <version>2.1.0-beta-1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpmime</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${dependency.httpcomponents.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <version>${dependency.httpcomponents.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>${dependency.httpcomponents.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${dependency.spring.version}</version>
        </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <!-- Non standard folder layout -->
    <sourceDirectory>source/java</sourceDirectory>
    <testSourceDirectory>source/test-java</testSourceDirectory>
    <resources>
        <resource>
            <directory>config</directory>
        </resource>
    </resources>
    <testResources>
        <testResource>
             <directory>source/test-resources</directory>
        </testResource>
    </testResources>

	<plugins>
		<plugin>
			<artifactId>maven-enforcer-plugin</artifactId>
			<executions>
				<execution>
					<id>enforcer</id>
					<goals>
						<goal>enforce</goal>
					</goals>
					<configuration>
						<rules>
							<requireJavaVersion>
								<version>1.7.0</version>
							</requireJavaVersion>
							<bannedDependencies>
                                <excludes>
                                    <exclude>xerces</exclude>
                                    <exclude>org.apache.xerces</exclude>
                                </excludes>
                                <includes>
                                    <include>xerces:xercesImpl:2.10.0-alfresco-patched</include>
                                </includes>
							</bannedDependencies>
						</rules>
					</configuration>
				</execution>
			</executions>
		</plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>properties-maven-plugin</artifactId>
            <executions>
                <!-- If version.properties can be found, read it to set version properties for manifest -->
                <execution>
                    <id>read-version-properties</id>
                    <phase>initialize</phase>
                    <goals>
                        <goal>read-project-properties</goal>
                    </goals>
                    <configuration>
                        <files>
                            <file>${highest.basedir}/projects/repository/config/alfresco/version.properties</file>
                        </files>
                        <quiet>true</quiet>
                    </configuration>
                </execution>
                <!-- Read alfresco-global.properties if it exists, to use it for cleaning runtime data (e.g. which database?) -->
                <execution>
                    <id>read-alfresco-global-properties</id>
                    <phase>initialize</phase>
                    <goals>
                        <goal>read-project-properties</goal>
                    </goals>
                    <configuration>
                        <files>
                            <file>${alfresco.properties.file}</file>
                        </files>
                        <quiet>true</quiet>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>1.8</version>
            <configuration>
                <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                <organizationName>Alfresco Software Limited</organizationName>
                <failOnMissingHeader>true</failOnMissingHeader>
                <failOnNotUptodateHeader>true</failOnNotUptodateHeader>
                <licenseResolver>classpath://alfresco</licenseResolver>
                <licenseName>${licenseName}</licenseName>
                <roots>
                    <root>src</root>
                    <root>source</root>
                </roots>
                <includes>
                    <include>**/*.java</include>
                    <include>**/*.jsp</include>
                </includes>
            </configuration>
            <executions>
                <execution>
                    <id>check-licenses</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>check-file-header</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.alfresco</groupId>
                    <artifactId>alfresco-license-headers</artifactId>
                    <version>1.0</version>
                </dependency>
            </dependencies>
        </plugin>

        <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
                <execution>
                    <id>set-default-db-props-on-initialize</id>
                    <phase>initialize</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <exportAntProperties>true</exportAntProperties>
                        <target>
                            <property name="db.driver" value="org.postgresql.Driver"/>
                            <property name="db.name" value="alfresco"/>
                            <property name="db.url" value="jdbc:postgresql:${db.name}"/>
                            <property name="db.master.url" value="jdbc:postgresql:template1"/>
                            <property name="db.username" value="alfresco"/>
                            <property name="db.password" value="alfresco"/>
                            <property name="db.master.username" value="alfresco"/>
                            <property name="db.master.password" value="alfresco"/>
                            <property name="db.drop.command" value="drop database if exists ${db.name}"/>
                            <property name="db.create.command" value="create database ${db.name}"/>
                        </target>
                    </configuration>
                </execution>
            </executions>
        </plugin>

		<!-- Create a jar of test classes, to be reused later in remote-api -->
		<plugin>
			<artifactId>maven-jar-plugin</artifactId>
			<executions>
				<execution>
					<id>create-test-jar</id>
					<goals>
						<goal>test-jar</goal>
					</goals>
				</execution>
			</executions>
		</plugin>

        <!--
            Add tomcat's shared/classes as a test source. This is not a nice solution
            to getting alfresco-global.properties onto the classpath, but since additionalClasspathElements
            for the surefire plugin does NOT work, we have to do something else.
            The problem with doing it this way is that the resources are copied to the target folder,
            rather than being referenced directly.
        -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>add-shared-classes</id>
                    <phase>generate-test-sources</phase>
                    <goals>
                        <goal>add-test-resource</goal>
                    </goals>
                    <configuration>
                        <resources>
                            <resource>
                                <directory>${runtime.tomcat.conf.folder}/shared/classes</directory>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <!-- Configure deployment of releases to Staging area of Nexus -->
        <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.6</version>
            <extensions>true</extensions>
            <configuration>
                <serverId>alfresco-internal-staging</serverId>
                <nexusUrl>https://artifacts.alfresco.com/nexus</nexusUrl>
                <stagingProfileId>${release.staging.profile}</stagingProfileId>
                <stagingDescription>Staging Platform ${project.version} (${bamboo_buildResultKey} ${bamboo_planRepository_revision})</stagingDescription>
                <tags>
                    <build.number>${bamboo_buildNumber}</build.number>
                    <build.key>${bamboo_buildKey}</build.key>
                    <build.revision>${bamboo_planRepository_revision}</build.revision>
                </tags>
            </configuration>
        </plugin>
    </plugins>

    <!-- Defining version and some configuration of Maven plugins -->
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- To prevent tests alfresco.log to be created in project roots and bother while synchronizing with SCM -->
                    <workingDirectory>${project.build.directory}</workingDirectory>
                    <systemPropertyVariables>
                        <!-- Modified BaseTest and AVMServiceTestBase to accept these properties
                         Otherwise test were looking in hardcoded relative locations -->
                        <alfresco.test.resources.dir>${basedir}/source/test-resources</alfresco.test.resources.dir>
                        <alfresco.web.resources.dir>${basedir}/source/web</alfresco.web.resources.dir>
                        <alfresco.java.sources.dir>${basedir}/source/java</alfresco.java.sources.dir>
                        <alfresco.target.dir>${project.build.directory}</alfresco.target.dir>
                        <!-- Allow FTP server unit test to run unprivileged -->
                        <ftp.port>50521</ftp.port>
                        <!-- ACE-2704 turned off the ftp and transfer service receiver which must be enabled for integration test -->
                        <ftp.enabled>true</ftp.enabled>
                        <transferservice.receiver.enabled>true</transferservice.receiver.enabled>
                        <!-- Database related properties -->
                        <db.url>${db.url}</db.url>
                        <db.driver>${db.driver}</db.driver>
                        <db.name>${db.name}</db.name>
                        <db.username>${db.username}</db.username>
                        <db.password>${db.password}</db.password>
                        <dir.root>${dir.root}</dir.root>
                        <img.exe>${img.exe}</img.exe>
                        <!-- BDE-91 -->
                        <alfresco.rmi.services.retries>30</alfresco.rmi.services.retries>
                        <alfresco.rmi.services.retryInterval>2000</alfresco.rmi.services.retryInterval>
                        <!-- Enables Lucene in continuous integration -->
                        <index.subsystem.name>${index.subsystem.name}</index.subsystem.name>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <javadocDirectory>source/javadoc</javadocDirectory>
                    <excludePackageNames>org.customer,org.apache</excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Specification-Version>${version.major}.${version.minor}.${version.revision}</Specification-Version>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Build-Date>${maven.build.timestamp}</Build-Date>
                            <Build-Name>${bamboo_planName}</Build-Name>
                            <Build-Key>${bamboo_fullBuildKey}</Build-Key>
                            <Build-Number>${bamboo_buildNumber}</Build-Number>
                            <Build-Revision>${bamboo_repository_revision_number}</Build-Revision>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Specification-Version>${version.major}.${version.minor}.${version.revision}</Specification-Version>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Build-Date>${maven.build.timestamp}</Build-Date>
                            <Build-Date>${maven.build.timestamp}</Build-Date>
                            <Build-Name>${bamboo_planName}</Build-Name>
                            <Build-Key>${bamboo_fullBuildKey}</Build-Key>
                            <Build-Number>${bamboo_buildNumber}</Build-Number>
                            <Build-Revision>${bamboo_repository_revision_number}</Build-Revision>
                        </manifestEntries>
                        <manifestSections>
                            <manifestSection>
                                <name>Source-control</name>
                                <manifestEntries>
                                    <Last-change-Revision>${bamboo_custom_svn_lastchange_revision_number}</Last-change-Revision>
                                    <Source-Revision>${bamboo_repository_revision_number}</Source-Revision>
                                    <Source-Url>${bamboo_planRepository_repositoryUrl}</Source-Url>
                                </manifestEntries>
                            </manifestSection>
                        </manifestSections>
                    </archive>
                    <warSourceDirectory>source/web</warSourceDirectory>
                </configuration>
                <!-- Add dependency to alfresco-maven-plugin, to allow AMP overlays -->
                <dependencies>
                    <dependency>
                        <groupId>org.alfresco.maven.plugin</groupId>
                        <artifactId>alfresco-maven-plugin</artifactId>
                        <version>${dependency.alfresco-sdk.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <configuration>
                    <webAppSourceDirectory>source/web</webAppSourceDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <configuration>
                    <webAppSourceDirectory>source/web</webAppSourceDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <dir.root>${dir.root}</dir.root>
                    </systemProperties>
                    <keystoreFile>${highest.basedir}/projects/system-build-test/keystore/ssl.keystore</keystoreFile>
                    <keystorePass>kT9X6oe68t</keystorePass>
                    <keystoreType>JCEKS</keystoreType>
                    <truststoreFile>${highest.basedir}/projects/system-build-test/keystore/ssl.truststore</truststoreFile>
                    <truststorePass>kT9X6oe68t</truststorePass>
                    <truststoreType>JCEKS</truststoreType>
                </configuration>
                <!-- Change version of Tomcat. Not working any more with Tomcat 8 - see MTOMCAT-234
                <dependencies>
                    <dependency>
                      <groupId>org.apache.tomcat.embed</groupId>
                      <artifactId>tomcat-embed-core</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-util</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-coyote</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-api</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-jdbc</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-dbcp</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-servlet-api</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-jsp-api</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-jasper</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-jasper-el</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-el-api</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-catalina</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-tribes</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-catalina-ha</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-annotations-api</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat</groupId>
                      <artifactId>tomcat-juli</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat.embed</groupId>
                      <artifactId>tomcat-embed-logging-juli</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                    <dependency>
                      <groupId>org.apache.tomcat.embed</groupId>
                      <artifactId>tomcat-embed-logging-log4j</artifactId>
                      <version>${dependency.tomcat.version}</version>
                    </dependency>
                </dependencies>
                -->
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sql-maven-plugin</artifactId>
                <configuration>
                    <skip>${db.skip}</skip>
                    <autocommit>true</autocommit>
                    <driver>${db.driver}</driver>
                    <url>${db.master.url}</url>
                    <username>${db.master.username}</username>
                    <password>${db.master.password}</password>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
        <properties>
            <!-- Filter solrcore.properties -->
            <ALFRESCO_SOLR4_DATA_DIR>${runtime.solr.folder}/data</ALFRESCO_SOLR4_DATA_DIR>
        </properties>
        <id>run</id>
        <build>
            <plugins>

                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-dependency-plugin</artifactId>
                  <executions>
                    <!-- Download and unpack the tomcat config zip file -->
                    <execution>
                      <id>unpack-tomcat-config</id>
                      <phase>generate-resources</phase>
                      <goals>
                        <goal>unpack</goal>
                      </goals>
                      <configuration>
                        <outputDirectory>${project.build.directory}/tomcat-conf</outputDirectory>
                        <artifactItems>
                          <artifactItem>
                            <groupId>org.alfresco</groupId>
                            <artifactId>alfresco-dev-tomcat</artifactId>
                            <version>${project.version}</version>
                            <classifier>config</classifier>
                            <overWrite>true</overWrite>
                            <type>zip</type>
                          </artifactItem>
                        </artifactItems>
                      </configuration>
                    </execution>

                    <!-- Download and unpack the solr4 config zip file -->
                    <execution>
                      <id>unpack-solr4-config</id>
                      <phase>generate-resources</phase>
                      <goals>
                        <goal>unpack</goal>
                      </goals>
                      <configuration>
                        <outputDirectory>${project.build.directory}/solr4</outputDirectory>
                        <artifactItems>
                          <artifactItem>
                            <groupId>org.alfresco</groupId>
                            <artifactId>alfresco-solr4</artifactId>
                            <version>${project.version}</version>
                            <classifier>config</classifier>
                            <overWrite>true</overWrite>
                            <type>zip</type>
                          </artifactItem>
                        </artifactItems>
                      </configuration>
                    </execution>
                  </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>filter-copy-solr4-config</id>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <phase>generate-resources</phase>
                            <configuration>
                                <outputDirectory>${runtime.solr.folder}</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${project.build.directory}/solr4</directory>
                                        <excludes>
                                            <exclude>workspace-SpacesStore/conf/solrcore.properties</exclude>
                                            <exclude>archive-SpacesStore/conf/solrcore.properties</exclude>
                                        </excludes>
                                        <filtering>false</filtering>
                                    </resource>
                                    <resource>
                                        <directory>${project.build.directory}/solr4</directory>
                                        <includes>
                                            <include>workspace-SpacesStore/conf/solrcore.properties</include>
                                            <include>archive-SpacesStore/conf/solrcore.properties</include>
                                        </includes>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                                <useDefaultDelimiters>false</useDefaultDelimiters>
                                <delimiters>
                                    <delimiter>@@</delimiter>
                                </delimiters>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <!-- Copy tomcat config from build directory to correct location -->
                        <!--
                            Q. Why not unpack directly to ${runtime.tomcat.conf.folder} ?
                            A. There is no way of telling maven NOT to overwrite the directory if it is already there.
                               overWrite doesn't work, overWriteIfNewer doesn't work either. The plugin uses marker files
                               to determine whether the zip has already been unpacked, rather than using the actual folder
                               where the contents are being unpacked - so if a clean is performed the marker files disappear
                               and the zip is unpacked regardless (overwriting your customised tomcat config). Whilst you
                               can change the location of the marker files, doing things this way really is going to be more
                               reliable, since the existing directory will be respected properly.
                         -->
                        <execution>
                            <id>copy-tomcat-config</id>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <phase>generate-resources</phase>
                            <configuration>
                                <target>
                                    <taskdef resource="net/sf/antcontrib/antcontrib.properties"
                                        classpathref="maven.plugin.classpath"/>
                                    <if>
                                        <available file="${runtime.tomcat.conf.folder}" type="dir"/>
                                        <then>
                                            <echo message="Skipping creation of tomcat configuration, already exists: ${runtime.tomcat.conf.folder}"/>
                                        </then>
                                        <else>
                                            <echo message="Creating tomcat runtime configuration: ${runtime.tomcat.conf.folder}"/>
                                            <copy todir="${runtime.tomcat.conf.folder}">
                                                <fileset dir="${project.build.directory}/tomcat-conf"/>
                                            </copy>
                                        </else>
                                    </if>
                                </target>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>ant-contrib</groupId>
                            <artifactId>ant-contrib</artifactId>
                            <version>20020829</version>
                        </dependency>
                    </dependencies>
                </plugin>


                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>run-exploded-webapp</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

    <!--
        Use "mvn initialize -Ppurge" to drop repo, solr and DB data, then re-create an empty DB.
        Or use with a later phase to build and start a fresh repo all in one go, e.g.
        "mvn [clean] install -Ppurge,run"
      -->
    <profile>
        <id>purge</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>delete-runtime-folders</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                            <configuration>
                                <excludeDefaultDirectories>true</excludeDefaultDirectories>
                                <filesets>
                                    <fileset>
                                        <directory>${runtime.data.folder}</directory>
                                    </fileset>
                                </filesets>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sql-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>drop-db</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>execute</goal>
                            </goals>
                            <configuration>
                                <skip>false</skip><!-- always run -->
                                <sqlCommand>${db.drop.command}</sqlCommand>
                            </configuration>
                        </execution>
                        <execution>
                            <id>create-db</id>
                            <phase>initialize</phase>
                            <goals>
                                <goal>execute</goal>
                            </goals>
                            <configuration>
                                <skip>false</skip><!-- always run -->
                                <sqlCommand>${db.create.command}</sqlCommand>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

    <!-- Profile to build Community packaging, including installers -->
    <profile>
        <id>packaging</id>
        <modules>
            <module>packaging</module>
        </modules>
    </profile>

    <!-- Profile to add all sub-projects - handy to change the version -->
    <profile>
        <id>allprojects</id>
        <modules>
            <module>packaging</module>
            <module>projects/office-application</module>
        </modules>

        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>2.0-1588784</version>
                    <executions>
                        <execution>
                            <id>default-cli</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <reactorModuleConvergence />
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

    <!-- Database profiles, if not using PostgreSQL -->
    <profile>
        <id>mysql-props</id>
        <properties>
            <db.master.url>jdbc:mysql://localhost/</db.master.url>
            <db.driver>com.mysql.jdbc.Driver</db.driver>
            <db.url>jdbc:mysql://localhost/${db.name}</db.url>
            <db.create.command>create database ${db.name} CHARACTER SET utf8 COLLATE utf8_bin;</db.create.command>
        </properties>
    </profile>

    <profile>
        <id>mariadb-props</id>
        <properties>
            <db.master.url>jdbc:mysql://localhost/</db.master.url>
            <db.driver>com.mysql.jdbc.Driver</db.driver>
            <db.url>jdbc:mysql://localhost/${db.name}</db.url>
        </properties>
    </profile>

    <profile>
        <id>oracle-props</id>
        <properties>
            <db.driver>oracle.jdbc.OracleDriver</db.driver>
            <db.url>jdbc:oracle:thin:@${db.host}:1521/${db.host}</db.url>
            <db.master.url>${db.url}</db.master.url>
            <db.drop.command>drop user ${db.username} cascade;</db.drop.command>
            <db.create.command>grant connect,resource to ${db.username} identified by ${db.password};</db.create.command>
        </properties>
    </profile>

    <profile>
        <id>oracle</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <configuration>
                        <systemProperties>
                            <db.driver>${db.driver}</db.driver>
                            <db.url>${db.url}</db.url>
                        </systemProperties>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.oracle.jdbc</groupId>
                            <artifactId>ojdbc7</artifactId>
                            <version>12.1.0.1.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sql-maven-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>com.oracle.jdbc</groupId>
                            <artifactId>ojdbc7</artifactId>
                            <version>12.1.0.1.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
        <dependencies>
            <dependency>
                <groupId>com.oracle.jdbc</groupId>
                <artifactId>ojdbc7</artifactId>
                <version>12.1.0.1.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </profile>

    <profile>
        <id>sqlserver-props</id>
        <properties>
            <db.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</db.driver>
            <db.url>jdbc:sqlserver://${db.host};databaseName=${db.name};</db.url>
            <db.master.url>jdbc:sqlserver://${db.host};databaseName=master</db.master.url>
            <db.master.username>${db.username}</db.master.username>
            <db.master.password>${db.password}</db.master.password>
            <db.drop.command>drop database ${db.name};</db.drop.command>
            <db.create.command>CREATE DATABASE ${db.name}; ALTER DATABASE ${db.name} SET ALLOW_SNAPSHOT_ISOLATION ON;</db.create.command>
        </properties>

    </profile>

    <profile>
        <id>sqlserver</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sql-maven-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>com.microsoft.sqlserver</groupId>
                            <artifactId>sqljdbc</artifactId>
                            <version>4.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <!-- MNT-13089 SQLServer needs the transaction isolation parameter increased -->
                        <systemPropertyVariables>
                            <db.txn.isolation>4096</db.txn.isolation>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        <dependencies>
            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>sqljdbc</artifactId>
                <version>4.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </profile>

    <profile>
        <id>db2-props</id>
        <properties>
            <db.driver>com.ibm.db2.jcc.DB2Driver</db.driver>
            <db.url>jdbc:db2://${db.host}:50000/${db.name}</db.url>
            <db.username>db2admin</db.username>
            <!-- No master URL for DB2: it's not possible to drop a database through an SQL command -->
        </properties>
    </profile>

    <profile>
        <id>db2</id>
        <dependencies>
            <dependency>
                <groupId>com.ibm.db2.jcc</groupId>
                <artifactId>db2jcc4</artifactId>
                <version>4.19.26</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </profile>

    <profile>
        <id>h2-props</id>
        <properties>
            <db.params>MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE</db.params>
            <db.master.url>jdbc:h2:${test.working.dir}/h2_data/${db.name};${db.params}</db.master.url>
            <db.driver>org.h2.jdbcx.JdbcDataSource</db.driver>
            <db.url>${db.master.url}</db.url>
        </properties>
    </profile>

    <profile>
        <id>h2</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <configuration>
                        <systemProperties>
                            <db.driver>org.h2.jdbcx.JdbcDataSource</db.driver>
                            <db.url>${db.master.url}</db.url>
                        </systemProperties>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>tk.skuro.alfresco</groupId>
                            <artifactId>h2-support</artifactId>
                            <version>1.6</version>
                        </dependency>
                        <dependency>
                            <groupId>com.h2database</groupId>
                            <artifactId>h2</artifactId>
                            <version>1.4.182</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
        <dependencies>
            <dependency>
                <groupId>tk.skuro.alfresco</groupId>
                <artifactId>h2-support</artifactId>
                <version>1.6</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
            </dependency>
        </dependencies>
    </profile>
    <profile>
        <id>doclint-java8-disable</id>
        <activation>
            <jdk>[1.8,)</jdk>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <additionalparam>-Xdoclint:none</additionalparam>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
    <!-- Generate the Javadoc for Public API only (filtered on AlfrescoPublicApi annotation) -->
    <profile>
        <id>publicapi</id>
        <properties>
            <docflex.version>1.6.1</docflex.version>
        </properties>
        <!-- Downloads the docflex license -->
        <dependencies>
            <dependency>
                <groupId>com.docflex</groupId>
                <artifactId>docflex-alfresco-license</artifactId>
                <version>1.0</version>
                <type>license</type>
            </dependency>
        </dependencies>
        <!-- Extracts Docflex locally -->
        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <executions>
                        <!-- Unzips the docflex/javadoc doclet -->
                        <execution>
                            <id>default-cli</id>
                            <inherited>false</inherited>
                            <goals>
                                <goal>unpack</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>com.docflex</groupId>
                                        <artifactId>docflex-javadoc</artifactId>
                                        <version>${docflex.version}</version>
                                        <type>zip</type>
                                    </artifactItem>
                                </artifactItems>
                                <outputDirectory>${project.build.directory}</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <doclet>com.docflex.javadoc.Doclet</doclet>
                        <docletPath>${project.build.directory}/docflex-javadoc-${docflex.version}/lib/docflex-javadoc.jar</docletPath>
                        <additionalparam>
                            -license ${settings.localRepository}/com/docflex/docflex-alfresco-license/1.0/docflex-alfresco-license-1.0.license
                            -template ${project.build.directory}/docflex-javadoc-${docflex.version}/templates/JavadocPro/FramedDoc.tpl
                            -nodialog
                            -launchviewer=false
                            -p:filter.byAnns.include.classes=org.alfresco.api.AlfrescoPublicApi
                            -p:docTitle "Alfresco ${project.version} Public API"
                            -p:windowTitle "Alfresco ${project.version} Public API"
                        </additionalparam>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>

	<profile>
		<id>solr-http</id>
		<build>
			<plugins>
				<plugin>
					<groupId>org.apache.tomcat.maven</groupId>
					<artifactId>tomcat7-maven-plugin</artifactId>
					<configuration>
						<systemProperties>
							<index.subsystem.name>solr</index.subsystem.name>
							<solr.host>localhost</solr.host>
							<solr.port>${tomcat.default.solr.port}</solr.port>
							<solr.secureComms>none</solr.secureComms>
							<solr.backup.alfresco.numberToKeep>0</solr.backup.alfresco.numberToKeep>
                            <solr.backup.archive.numberToKeep>0</solr.backup.archive.numberToKeep>
						</systemProperties>
					</configuration>
				</plugin>
			</plugins>
		</build>
	</profile>
	  <profile>
        <id>solr4-ssl</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <configuration>
                        <systemProperties>
                            <index.subsystem.name>solr4</index.subsystem.name>
                            <solr.host>localhost</solr.host>
                            <solr.port>${tomcat.default.solr4.ssl.port}</solr.port>
                            <solr.secureComms>https</solr.secureComms>
                            <solr.backup.alfresco.numberToKeep>0</solr.backup.alfresco.numberToKeep>
                            <solr.backup.archive.numberToKeep>0</solr.backup.archive.numberToKeep>
                        </systemProperties>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>
  </profiles>
</project>
