<?xml version="1.0" encoding="UTF-8"?>
<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.consulting</groupId>
    <artifactId>alfresco-consulting-repo-utils</artifactId>
    <version>0.4.0</version>
    <name>alfresco-consulting-repo-utils Repository AMP project</name>
    <packaging>amp</packaging>
    <description>Manages the lifecycle of the alfresco-consulting-repo-utils Repository AMP (Alfresco Module Package)</description>

    <parent>
        <groupId>org.alfresco.maven</groupId>
        <artifactId>alfresco-sdk-parent</artifactId>
        <version>2.0.0</version>
    </parent>
    <repositories>
          <repository>
            <id>alfresco-private-repository</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/hotfix</url>
          </repository>
     </repositories>

    <!-- 
       | SDK properties have sensible defaults in the SDK parent,
       | but you can override the properties below to use another version. 
       | For more available properties see the alfresco-sdk-parent POM. 
       -->
    <properties>
        <!--
            | Defines the groupId for the Alfresco Artifacts to work against. As of 4.2 the only allowed value is: org.alfresco
            | NOTE: See http://docs.alfresco.com/4.2/concepts/dev-extensions-maven-sdk-tutorials-alfresco-enterprise.html for details
        -->
        <!-- <alfresco.groupId>org.alfresco</alfresco.groupId> -->
        <!-- Defines the Alfresco version to work against.
             Community versions are typically identified by major.minor.character (4.2.a) while Enterprise versions are identified by major.minor.digit (4.2.0)  -->
        <alfresco.version>5.0</alfresco.version>
        <app.log.root.level>WARN</app.log.root.level>
        <alfresco.data.location>alf_data_dev</alfresco.data.location>
        <!-- This controls which properties will be picked in src/test/properties for embedded run -->
        <env>local</env>
        <!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war profile
             | Defaults to a vanilla repository AMP, but could point to your foundation / aggregator WAR 
        .    | Allowed values for Community: alfresco | share
             | Allowed values for Enterprise: alfresco-enterprise | share-enterprise
             <alfresco.client.war>${alfresco.repo.artifactId}</alfresco.client.war> -->
        <!-- Context path to run alfresco on -->
        <alfresco.client.contextPath>/alfresco</alfresco.client.contextPath>
        <!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
        .    | Could be org.alfresco or your corporate groupId -->
        <!-- <alfresco.client.war.groupId>${alfresco.groupId}</alfresco.client.war.groupId> -->
        
        <!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
        <!-- <alfresco.client.war.version>${alfresco.version}</alfresco.client.war.version>-->
    </properties>

    <!-- Here we realize the connection with the Alfresco selected platform 
        (e.g.version and edition) -->
    <dependencyManagement>
        <dependencies>
            <!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
                (see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies) 
                NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. NOTE: It defaults 
                to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom -->
            <dependency>
                <groupId>${alfresco.groupId}</groupId>
                <artifactId>alfresco-platform-distribution</artifactId>
                <version>${alfresco.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <!-- Following dependencies are needed for compiling Java code in src/main/java; 
         <scope>provided</scope> is inherited for each of the following; 
         for more info, please refer to alfresco-platform-distribution POM -->
    <dependencies>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-repository</artifactId>
        </dependency>
    </dependencies>
    <profiles>
    	<!-- Enterprise profile, manually activated, automatically adds support for Enterprise edition development (dependencies) -->
        <profile>
            <id>enterprise</id>
            <dependencies>
                <dependency>
                    <groupId>${alfresco.groupId}</groupId>
                    <artifactId>alfresco-enterprise-repository</artifactId>
                    <version>${alfresco.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    <build><plugins><plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifact</id>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <attachartifact file="target/${artifactId}/lib/${artifactId}.jar" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin></plugins>
    	<pluginManagement>
    		<plugins>
    			<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
    			<plugin>
    				<groupId>org.eclipse.m2e</groupId>
    				<artifactId>lifecycle-mapping</artifactId>
    				<version>1.0.0</version>
    				<configuration>
    					<lifecycleMappingMetadata>
    						<pluginExecutions>
    							<pluginExecution>
    								<pluginExecutionFilter>
    									<groupId>
    										org.codehaus.mojo
    									</groupId>
    									<artifactId>
    										build-helper-maven-plugin
    									</artifactId>
    									<versionRange>
    										[1.9.1,)
    									</versionRange>
    									<goals>
    										<goal>
    											add-test-resource
    										</goal>
    									</goals>
    								</pluginExecutionFilter>
    								<action>
    									<ignore></ignore>
    								</action>
    							</pluginExecution>
    						</pluginExecutions>
    					</lifecycleMappingMetadata>
    				</configuration>
    			</plugin>
    		</plugins>
    	</pluginManagement>
    </build>
    	<distributionManagement>
		<repository>
			<id>alfresco-consulting-public</id>
			<name>Alfresco Consulting Releases</name>
			<url>https://artifacts.alfresco.com/nexus/content/repositories/alfresco-consulting-public</url>
			<layout>default</layout>
		</repository>
	</distributionManagement>

</project>
