<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2017 Netcentric AG. All rights reserved. This program
    and the accompanying materials are made available under the terms of the
    Eclipse Public License v1.0 which accompanies this distribution, and is available
    at http://www.eclipse.org/legal/epl-v10.html -->
<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>
    <!-- ====================================================================== -->
    <!-- P A R E N T P R O J E C T D E S C R I P T I O N -->
    <!-- ====================================================================== -->

    <groupId>biz.netcentric.aem.tools.accesscontrolvalidator</groupId>
    <artifactId>accesscontrolvalidator</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>Access Control Validator</name>
    <description>Maven project for Access Control Validator.</description>
    <url>https://github.com/Netcentric/accesscontrolvalidator</url>

    <organization>
        <name>Netcentric - A Cognizant Digital Business</name>
        <url>https://www.netcentric.biz/</url>
    </organization>
    <developers>
        <developer>
            <name>Jochen Koschorke</name>
            <email>jochen.koschorke@netcentric.biz</email>
            <id>jochen.koschorke@netcentric.biz</id>
            <organization>Netcentric</organization>
            <organizationUrl>https://www.netcentric.biz/</organizationUrl>
        </developer>
    </developers>
    
    <licenses>
        <license>
            <name>Eclipse Public License, Version 1.0</name>
            <url>https://www.eclipse.org/legal/epl-v10.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/Netcentric/access-control-validator.git</connection>
        <developerConnection>scm:git:https://github.com/Netcentric/access-control-validator.git</developerConnection>
        <url>https://github.com/Netcentric/access-control-validator.git</url>
        <tag>1.0.0</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <prerequisites>
        <maven>3.0.2</maven>
    </prerequisites>

    <!-- ====================================================================== -->
    <!-- P R O P E R T I E S -->
    <!-- ====================================================================== -->
    <properties>
        <crx.host>localhost</crx.host>
        <crx.port>4502</crx.port>
        <crx.username>admin</crx.username>
        <crx.password>admin</crx.password>
        <publish.crx.host>localhost</publish.crx.host>
        <publish.crx.port>4503</publish.crx.port>
        <publish.crx.username>admin</publish.crx.username>
        <publish.crx.password>admin</publish.crx.password>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>
    
    <modules>
        <module>accesscontrolvalidator-api</module>
        <module>accesscontrolvalidator-bundle</module>
        <module>accesscontrolvalidator-package</module>
        <module>accesscontrolvalidator-examples-package</module>
    </modules>

    <dependencyManagement>
        <dependencies>
	        <dependency>
	            <groupId>com.day.cq</groupId>
	            <artifactId>cq-security</artifactId>
	            <version>5.6.2</version>
                <scope>provided</scope>
	        </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.api</artifactId>
                <version>2.9.0</version>
                <scope>provided</scope>
            </dependency>
	        <dependency>
	            <groupId>org.apache.sling</groupId>
	            <artifactId>org.apache.sling.hc.annotations</artifactId>
	            <scope>provided</scope>
	            <version>1.0.4</version>
	        </dependency>
			<dependency>
				<groupId>org.apache.sling</groupId>
				<artifactId>org.apache.sling.hc.core</artifactId>
				<scope>provided</scope>
				<version>1.2.4</version>
			</dependency>
	        <dependency>
	            <groupId>org.apache.sling</groupId>
	            <artifactId>org.apache.sling.settings</artifactId>
	            <version>1.2.2</version>
	            <scope>provided</scope>
	        </dependency>
			<dependency>
				<groupId>javax.jcr</groupId>
				<artifactId>jcr</artifactId>
				<version>2.0</version>
                <scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>com.day.cq</groupId>
				<artifactId>cq-commons</artifactId>
				<version>5.6.4</version>
				<scope>provided</scope>
			</dependency>
	        <dependency>
	            <groupId>org.apache.jackrabbit</groupId>
	            <artifactId>jackrabbit-api</artifactId>
	            <version>2.9.0</version>
	            <scope>provided</scope>
	        </dependency>
			<dependency>
			  <groupId>org.apache.jackrabbit</groupId>
			  <artifactId>oak-commons</artifactId>
			  <version>1.2.7</version>
			  <scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.felix</groupId>
				<artifactId>org.apache.felix.scr.annotations</artifactId>
				<version>1.10.0</version>
			</dependency>
	        <dependency>
	            <groupId>org.osgi</groupId>
	            <artifactId>org.osgi.core</artifactId>
	            <version>4.2.0</version>
	        </dependency>
	        <dependency>
	            <groupId>com.adobe.granite</groupId>
	            <artifactId>com.adobe.granite.jmx</artifactId>
	            <version>0.2.6</version>
	        </dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<scope>provided</scope>
				<version>3.0.1</version>
			</dependency>
			<dependency>
				<groupId>com.adobe.granite.bundles</groupId>
				<artifactId>json</artifactId>
				<version>20090211_1</version>
				<scope>provided</scope>
			</dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>1.13</version>
            </dependency>
			<dependency>
				<groupId>biz.aQute</groupId>
				<artifactId>bndlib</artifactId>
				<version>1.43.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.3.2</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>1.7.6</version>
                <scope>provided</scope>
			</dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>1.10.19</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Inclusion of repositories in POMs is controversial, to say the least.
        It would be best if you proxied the Adobe repository using a Maven Repository
        Manager. Once you do that, remove these sections. -->
    <repositories>
        <repository>
            <id>adobe</id>
            <name>Adobe Public Repository</name>
            <url>http://repo.adobe.com/nexus/content/groups/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>adobe</id>
            <name>Adobe Public Repository</name>
            <url>http://repo.adobe.com/nexus/content/groups/public/</url>
            <layout>default</layout>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-scr-plugin</artifactId>
                    <version>1.20.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.14.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>maven-sling-plugin</artifactId>
                    <version>2.1.0</version>
                    <configuration>
                        <username>${crx.username}</username>
                        <password>${crx.password}</password>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.day.jcr.vault</groupId>
                    <artifactId>content-package-maven-plugin</artifactId>
                    <version>0.0.24</version>
                    <extensions>true</extensions>
                    <configuration>
                        <failOnError>true</failOnError>
                        <username>${crx.username}</username>
                        <password>${crx.password}</password>
                    </configuration>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.apache.felix
                                        </groupId>
                                        <artifactId>
                                            maven-scr-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.0.0,)
                                        </versionRange>
                                        <goals>
                                            <goal>scr</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>external.atlassian.jgitflow</groupId>
                    <artifactId>jgitflow-maven-plugin</artifactId>
                    <version>1.0-m5.1</version>
                    <configuration>
                        <enableSshAgent>true</enableSshAgent>
                        <enableFeatureVersions>true</enableFeatureVersions>
                        <pushReleases>true</pushReleases>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <releaseBranchVersionSuffix>rc</releaseBranchVersionSuffix>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>

    <profiles>

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

        <profile>
            <id>autoInstallBundle</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>maven-sling-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-bundle</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

</project>
