<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.alfresco</groupId>
   <artifactId>alfresco-rm</artifactId>
   <packaging>pom</packaging>
   <version>2.6.b</version>
   <name>Alfresco Records Management</name>

   <parent>
      <groupId>org.alfresco.maven</groupId>
      <artifactId>alfresco-sdk-parent</artifactId>
      <version>2.1.1</version>
   </parent>

   <url>http://www.alfresco.org/</url>
   <inceptionYear>2005</inceptionYear>
   <organization>
      <name>Alfresco Software</name>
      <url>http://www.alfresco.org/</url>
   </organization>

   <scm>
      <connection>scm:git:https://git.alfresco.com/records-management/records-management.git</connection>
      <developerConnection>scm:git:https://git.alfresco.com/records-management/records-management.git</developerConnection>
      <url>https://git.alfresco.com/records-management/records-management</url>
     <tag>V2.6.b</tag>
  </scm>

   <issueManagement>
      <system>JIRA</system>
      <url>https://issues.alfresco.com/jira/browse/RM</url>
   </issueManagement>
   <ciManagement>
      <system>Bamboo</system>
      <url>https://bamboo.alfresco.com/bamboo/browse/RM</url>
   </ciManagement>

   <prerequisites>
      <maven>3.2.5</maven>
   </prerequisites>

   <repositories>
      <repository>
         <id>alfresco-public</id>
         <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
      </repository>
   </repositories>

   <pluginRepositories>
      <pluginRepository>
         <id>alfresco-public</id>
         <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
      </pluginRepository>
   </pluginRepositories>

   <distributionManagement>
      <repository>
         <id>alfresco-internal</id>
         <url>https://artifacts.alfresco.com/nexus/content/repositories/internal-releases/</url>
      </repository>
      <snapshotRepository>
         <id>alfresco-internal-snapshots</id>
         <url>https://artifacts.alfresco.com/nexus/content/repositories/internal-snapshots/</url>
      </snapshotRepository>
   </distributionManagement>

   <modules>
      <module>rm-community</module>
   </modules>

   <profiles>
      <profile>
         <id>enterprise</id>
         <activation>
            <property>
               <name>!community</name>
            </property>
         </activation>
         <modules>
            <module>rm-enterprise</module>
            <module>rm-automation</module>
            <module>rm-benchmark</module>
         </modules>
         <repositories>
            <repository>
               <id>alfresco-internal</id>
               <url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
            </repository>
         </repositories>
         <pluginRepositories>
            <pluginRepository>
               <id>alfresco-private</id>
               <url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
            </pluginRepository>
         </pluginRepositories>
      </profile>
   </profiles>

   <properties>
      <alfresco.db.params>AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=FALSE;LOCK_MODE=0;IGNORECASE=TRUE</alfresco.db.params>
      <maven.alfresco.includeDependencies>false</maven.alfresco.includeDependencies>
      <maven.build.sourceVersion>1.8</maven.build.sourceVersion>
      <maven.build.testSourceVersion>1.8</maven.build.testSourceVersion>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <argLine>-Xmx1024m -XX:MaxPermSize=256m -Duser.language=en -Dcom.sun.management.jmxremote</argLine>
      <license.update.dryrun>true</license.update.dryrun>
      <license.verbose>false</license.verbose>
   </properties>

   <dependencies>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>4.12</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <finalName>${project.artifactId}-${project.version}</finalName>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
               <execution>
                  <id>enforce-java</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <requireJavaVersion>
                           <version>1.8</version>
                        </requireJavaVersion>
                     </rules>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>regex-properties</id>
                  <goals>
                     <goal>regex-properties</goal>
                  </goals>
                  <configuration>
                     <regexPropertySettings>
                        <regexPropertySetting>
                           <name>rm.module.repo.version.min</name>
                           <value>${alfresco.version}</value>
                            <regex>(\d+)\.(\d+).*</regex>
                            <replacement>$1.$2</replacement>
                           <failIfNoMatch>false</failIfNoMatch>
                        </regexPropertySetting>
                        <regexPropertySetting>
                           <name>rm.module.version</name>
                           <value>${project.version}</value>
                           <regex>([0-9\.]*[0-9]).*</regex>
                           <replacement>$1</replacement>
                           <failIfNoMatch>false</failIfNoMatch>
                        </regexPropertySetting>
                     </regexPropertySettings>
                  </configuration>
               </execution>
               <execution>
                  <id>add-test-source</id>
                  <goals>
                     <goal>add-test-source</goal>
                  </goals>
                  <configuration>
                     <sources>
                        <source>src/unit-test/java</source>
                     </sources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
               <includes>
                  <include>**/*UnitTest.java</include>
               </includes>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <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>
            <version>2.10.4</version>
            <executions>
               <execution>
                  <id>attach-javadocs</id>
                  <goals>
                     <goal>jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>${maven.compiler.version}</version>
               <configuration>
                  <source>${maven.build.sourceVersion}</source>
                  <target>${maven.build.sourceVersion}</target>
               </configuration>
               <executions>
                  <execution>
                     <id>default-testCompile</id>
                     <phase>process-test-sources</phase>
                     <goals>
                        <goal>testCompile</goal>
                     </goals>
                     <configuration>
                        <source>${maven.build.testSourceVersion}</source>
                        <target>${maven.build.testSourceVersion}</target>
                     </configuration>
                  </execution>
               </executions>
            </plugin>
            <plugin>
               <groupId>org.eclipse.m2e</groupId>
               <artifactId>lifecycle-mapping</artifactId>
               <version>1.0.0</version>
               <configuration>
                  <lifecycleMappingMetadata>
                     <pluginExecutions>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-enforcer-plugin</artifactId>
                              <versionRange>[1.0.0,)</versionRange>
                              <goals>
                                 <goal>enforce</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore />
                           </action>
                        </pluginExecution>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>
                                    org.codehaus.mojo
                                </groupId>
                                <artifactId>
                                    build-helper-maven-plugin
                                </artifactId>
                                <versionRange>
                                    [1.9.1,)
                                </versionRange>
                                <goals>
                                    <goal>regex-properties</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <ignore />
                            </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-enforcer-plugin</artifactId>
               <version>${maven.enforcer.plugin}</version>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>properties-maven-plugin</artifactId>
               <version>1.0-alpha-2</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-failsafe-plugin</artifactId>
               <version>2.19</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <version>1.8</version>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>build-helper-maven-plugin</artifactId>
               <version>${maven.buildhelper.version}</version>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>sql-maven-plugin</artifactId>
               <version>1.5</version>
            </plugin>

            <!-- Maven Release Plugin (Use a recent version for better Git Support) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <tagNameFormat>V@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

            <!-- Disable doclint until RM-3150 is fixed -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.8</version>
                <configuration>

                   <verbose>${license.verbose}</verbose>
                   <addSvnKeyWords>false</addSvnKeyWords>
                   <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>

                   <!-- header configuration -->
                   <organizationName>Alfresco Software Limited</organizationName>
                   <descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
                   <canUpdateCopyright>true</canUpdateCopyright>
                   <canUpdateDescription>true</canUpdateDescription>

                   <!-- licence configuration -->
                   <licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>

                   <!-- dry run options -->
                   <dryRun>${license.update.dryrun}</dryRun>
                   <failOnMissingHeader>true</failOnMissingHeader>
                   <failOnNotUptodateHeader>true</failOnNotUptodateHeader>

                   <!-- default root -->
                   <roots>
                       <root>src</root>
                   </roots>

                   <!-- exculsions -->
                   <excludes>
                       <exclude>**/package-info.java</exclude>
                       <exclude>**/*.properties</exclude>
                       <exclude>**/*.css</exclude>
                       <exclude>**/*.xml</exclude>
                       <exclude>**/*.json</exclude>
                       <exclude>**/*.txt</exclude>
                       <exclude>**/*.html</exclude>
                   </excludes>

                </configuration>
                <executions>
                   <execution>
                      <id>first</id>
                      <goals>
                         <goal>update-file-header</goal>
                      </goals>
                      <phase>process-sources</phase>
                   </execution>
                </executions>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-resources-plugin</artifactId>
               <version>${maven.resources.version}</version>
               <dependencies>
                  <dependency>
                     <groupId>org.apache.maven.shared</groupId>
                     <artifactId>maven-filtering</artifactId>
                     <version>3.1.1</version>
                  </dependency>
               </dependencies>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
</project>
