<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  wcm.io
  %%
  Copyright (C) 2015 wcm.io
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.wcm.maven</groupId>
  <artifactId>io.wcm.maven.aem-dependencies</artifactId>
  <version>6.2.0.0002</version>
  <packaging>pom</packaging>

  <name>io.wcm.maven.aem-dependencies</name>
  <description>Defines Maven dependencies for a specific AEM version, including those that are not defined in the aem-api "Uber" JAR provided by Adobe.</description>
  <url>http://wcm.io</url>

  <scm>
    <connection>scm:git:https://github.com/wcm-io/wcm-io-tooling.git</connection>
    <developerConnection>scm:git:https://github.com/wcm-io/wcm-io-tooling.git</developerConnection>
    <url>https://github.com/wcm-io/wcm-io-tooling</url>
    <tag>HEAD</tag>
  </scm>

  <inceptionYear>2016</inceptionYear>

  <organization>
    <name>wcm.io</name>
    <url>http://wcm.io</url>
  </organization>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>wcm.io Community</name>
      <organization>wcm.io</organization>
      <organizationUrl>http://wcm.io</organizationUrl>
    </developer>
  </developers>

  <properties>
    <!-- versions -->
    <slf4j.version>1.7.6</slf4j.version>

    <!-- repository settings -->
    <distribution.snapshotRepositoryId>ossrh</distribution.snapshotRepositoryId>
    <distribution.snapshotRepositoryUrl>https://oss.sonatype.org/content/repositories/snapshots</distribution.snapshotRepositoryUrl>
    <distribution.releaseRepositoryId>ossrh</distribution.releaseRepositoryId>
    <distribution.releaseRepositoryUrl>https://oss.sonatype.org/service/local/staging/deploy/maven2/</distribution.releaseRepositoryUrl>
  </properties>

  <dependencyManagement>
    <dependencies>

<!--
     #######################################################################

      Dependencies from this CQ release:
      - AEM_6.2_Quickstart.jar

     #######################################################################
-->

      <!-- AEM public dependencies (includes Sling and Jackrabbit public dependencies) -->
      <dependency>
        <groupId>com.adobe.aem</groupId>
        <artifactId>uber-jar</artifactId>
        <version>6.2.0</version>
        <classifier>apis</classifier>
      </dependency>

      <!-- from /libs/cq/commons/install -->
      <!--
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-client</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-core</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-extensions-media</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-extensions-opensearch</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-i18n</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-parser</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-server</artifactId>
        <version>1.0-R783018</version>
      </dependency>
      -->
      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-xml</artifactId>
        <version>2.0.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>fop</artifactId>
        <!-- com.day.commons.osgi.wrapper.fop 1.0.4 contains FOP 1.0 -->
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>        
        <version>2.9.1</version>
      </dependency>

      <!-- ################################################################################# -->

      <!-- from crx-quickstart/app/cq-quickstart-*-standalone.jar/resources/bundles/1 -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <!-- from crx-quickstart/app/cq-quickstart-*-standalone.jar/resources/install/0 -->
      <dependency>
        <groupId>com.day.commons.osgi.wrapper</groupId>
        <artifactId>com.day.commons.osgi.wrapper.commons-email</artifactId>
        <version>1.2.0-0002</version>
      </dependency>
      <dependency>
        <groupId>com.day.commons.osgi.wrapper</groupId>
        <artifactId>com.day.commons.osgi.wrapper.commons-httpclient</artifactId>
        <version>3.1.0.018</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcomponents-core</artifactId>
        <version>4.3.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcomponents-client</artifactId>
        <version>4.3.4</version>
      </dependency>
      <!--
      <dependency>
        <groupId>com.day.commons.osgi.wrapper</groupId>
        <artifactId>com.day.commons.osgi.wrapper.simple-jndi</artifactId>
        <version>0.11.14.1.0010</version>
      </dependency>
      -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-math</artifactId>
        <version>2.2</version>
      </dependency>
      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.5.0-b01</version>
      </dependency>

      <!-- from crx-quickstart/app/cq-quickstart-*-standalone.jar/resources/install/5 -->
      <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.3.1</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.4</version>
      </dependency>
      <!--
      json-20090211_1.jar
      -->

      <!-- from crx-quickstart/app/cq-quickstart-*-standalone.jar/resources/install/9 -->
      <dependency>
        <groupId>com.day.commons.osgi.wrapper</groupId>
        <artifactId>com.day.commons.osgi.wrapper.commons-lang2</artifactId>
        <version>2.5-0001</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.2</version>
      </dependency>

      <!-- from crx-quickstart/app/cq-quickstart-*-standalone.jar/resources/install/14 -->
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <!-- com.adobe.granite.poi 2.0.6 contains POI 3.11 -->
        <version>3.11</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-scratchpad</artifactId>
        <version>3.11</version>
      </dependency>
      <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.11</version>
      </dependency>
      <dependency>
        <groupId>com.adobe.granite</groupId>
        <artifactId>com.adobe.granite.tagsoup</artifactId>
        <version>1.2.1</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.10</version>
      </dependency>
      
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-imaging</artifactId>
        <!-- AEM contains 1.0.0.R1725432-B002, but this is not available in any public repo -->
        <version>1.0-R1534292</version>
      </dependency>

      <!-- OSGI -->
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.core</artifactId>
        <version>6.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>osgi.cmpn</artifactId>
        <version>6.0.0</version>
      </dependency>

      <!-- JCR/Servlet/JSP API -->
      <dependency>
        <groupId>javax.jcr</groupId>
        <artifactId>jcr</artifactId>
        <version>2.0</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-atinject_1.0_spec</artifactId>
        <version>1.0</version>
      </dependency>

      <!-- Guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>15.0</version>
      </dependency>

      <!-- Commons depdencies contained in OSGI wrapper jars -->
      <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
      </dependency>
      
      <!-- Dependencies that may required by AEM mocks/Sling mocks with version included in this AEM version -->
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.api</artifactId>
        <version>2.11.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.jackrabbit</groupId>
        <artifactId>jackrabbit-jcr-commons</artifactId>
        <version>2.12.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.osgi</artifactId>
        <version>2.4.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.resourceresolver</artifactId>
        <version>1.4.8</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.serviceusermapper</artifactId>
        <version>1.2.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.jcr.api</artifactId>
        <version>2.3.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.jcr.resource</artifactId>
        <version>2.7.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.mime</artifactId>
        <version>2.1.8</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.json</artifactId>
        <version>2.0.16</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.classloader</artifactId>
        <version>1.3.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.settings</artifactId>
        <version>1.3.8</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.i18n</artifactId>
        <version>2.4.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.models.api</artifactId>
        <version>1.2.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.models.impl</artifactId>
        <version>1.2.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.jackrabbit</groupId>
        <artifactId>oak-jcr</artifactId>
        <version>1.4.1</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
             <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <skip>true</skip>
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>
      <plugin>
        <groupId>external.atlassian.jgitflow</groupId>
        <artifactId>jgitflow-maven-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <scmCommentPrefix>[jgitflow-maven-plugin] </scmCommentPrefix>
          <eol>lf</eol>
          <flowInitContext>
            <releaseBranchPrefix>release/${project.artifactId}-</releaseBranchPrefix>
            <hotfixBranchPrefix>hotfix/${project.artifactId}-</hotfixBranchPrefix>
            <versionTagPrefix>${project.artifactId}-</versionTagPrefix>
          </flowInitContext>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <goals>deploy</goals>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>1.9.4</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
        </plugin>
        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0-m5.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>

    <!-- configuration to deploy into maven central -->
    <profile>
      <id>release-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <!-- sign the build -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- configure staging process at sonatype.-->
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <inherited>false</inherited>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <!-- Deployed artifacts should go to staging to be reviewed before publish -->
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

  <distributionManagement>
    <repository>
      <id>${distribution.releaseRepositoryId}</id>
      <url>${distribution.releaseRepositoryUrl}</url>
    </repository>
    <snapshotRepository>
      <id>${distribution.snapshotRepositoryId}</id>
      <url>${distribution.snapshotRepositoryUrl}</url>
    </snapshotRepository>
  </distributionManagement>

</project>
