<?xml version="1.0" encoding="UTF-8"?>
<!--
- Danta Parent Bundle
-
- Copyright (C) 2017 Tikal Technologies, Inc. All rights reserved.
-
- Licensed under GNU Affero General Public License, Version v3.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-      https://www.gnu.org/licenses/agpl-3.0.txt
-
- 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;
- without even the implied warranty of MERCHANTABILITY.
- See the License for more details.
-->
<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.tikaltechnologies.danta</groupId>
    <artifactId>parent</artifactId>
    <version>1.0.1</version>
    <packaging>pom</packaging>

    <name>Danta Parent</name>
    <description>The maven parent to most Danta projects</description>
    <url>https://github.com/DantaFramework/Parent</url>

    <licenses>
        <license>
            <name>GNU AFFERO GENERAL PUBLIC LICENSE</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Tikal Technologies Core Team</name>
            <email>support@tikaltechnologies.io</email>
            <organization>Tikal Technologies, Inc</organization>
            <organizationUrl>https://tikaltechnologies.io/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/DantaFramework/Parent.git</connection>
        <developerConnection>scm:git:ssh://github.com/DantaFramework/Parent.git</developerConnection>
        <url>https://github.com/DantaFramework/Parent/tree/master</url>
    </scm>

    <properties>
        <!-- Properties for deployment to AEM-->
        <aem.server>http://localhost:4502</aem.server>
        <slingURL>${aem.server}/system/console/install</slingURL>
        <aem.username>admin</aem.username>
        <aem.password>admin</aem.password>
        <targetJVM>1.8</targetJVM>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Nexus properties -->
        <nexus.snapshots.url>http://repo.tikaltechnologies.io/repository/danta-snapshots/</nexus.snapshots.url>
        <nexus.releases.url>http://repo.tikaltechnologies.io/repository/danta-releases/</nexus.releases.url>

        <!--jgitflow properties -->
        <project.dev.version></project.dev.version>
        <project.release.version></project.release.version>

        <!-- Properties for deployment to Jahia-->
        <jahia.username>jahia</jahia.username>
        <jahia.password>password</jahia.password>
        <jahia.server>http://localhost:8080</jahia.server>
        <jahia.slingURL>${jahia.server}/tools/osgi/console/install</jahia.slingURL>

    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.2.0</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-scr-plugin</artifactId>
                    <version>1.23.0</version>
                    <configuration>
                        <scanClasses>true</scanClasses>
                    </configuration>
                    <executions>
                        <execution>
                            <id>generate-scr-scrdescriptor</id>
                            <goals>
                                <goal>scr</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.sling</groupId>
                    <artifactId>maven-sling-plugin</artifactId>
                    <version>2.1.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                </plugin>
                <plugin>
                    <groupId>external.atlassian.jgitflow</groupId>
                    <artifactId>jgitflow-maven-plugin</artifactId>
                    <version>1.0-m5.1</version>
                    <configuration>
                        <flowInitContext>
                            <masterBranchName>master</masterBranchName>
                            <developBranchName>develop</developBranchName>
                        </flowInitContext>
                        <releaseVersion>${project.release.version}</releaseVersion>
                        <developmentVersion>${project.dev.version}</developmentVersion>
                        <noDeploy>true</noDeploy>
                        <squash>true</squash>
                        <useReleaseProfile>false</useReleaseProfile>
                        <scmCommentPrefix>[RELEASE] </scmCommentPrefix>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-sling-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- This profile deploys the bundle to an AEM instance -->
        <profile>
            <id>deploy-aem</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>maven-sling-plugin</artifactId>
                        <version>2.1.8</version>
                        <executions>
                            <execution>
                                <id>install-bundle</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <slingUrl>${slingURL}</slingUrl>
                                    <user>${aem.username}</user>
                                    <password>${aem.password}</password>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This profile deploys a JAR to nexus snapshots repository -->
        <profile>
            <id>deploy-nexus</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy-nexus</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy-file</goal>
                                </goals>
                                <configuration>
                                    <repositoryId>danta-snapshots</repositoryId>
                                    <packaging>jar</packaging>
                                    <generatePom>true</generatePom>
                                    <url>${nexus.snapshots.url}</url>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <file>target/${project.artifactId}-${project.version}.jar</file>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This profile deploys a pom to nexus snapshots repository -->
        <profile>
            <id>deploy-pom-nexus</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy-pom</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy-file</goal>
                                </goals>
                                <configuration>
                                    <repositoryId>danta-snapshots</repositoryId>
                                    <packaging>pom</packaging>
                                    <generatePom>true</generatePom>
                                    <url>${nexus.snapshots.url}</url>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <file>pom.xml</file>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This profile deploys a ZIP to nexus snapshots repository -->
        <profile>
            <id>deploy-zip-nexus</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy-package</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy-file</goal>
                                </goals>
                                <configuration>
                                    <repositoryId>danta-snapshots</repositoryId>
                                    <packaging>zip</packaging>
                                    <url>${nexus.snapshots.url}</url>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <file>target/${project.artifactId}-${project.version}.zip</file>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This profile deploys a JAR to nexus releases repository -->
        <profile>
            <id>deploy-nexus-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy-nexus</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy-file</goal>
                                </goals>
                                <configuration>
                                    <repositoryId>danta-releases</repositoryId>
                                    <packaging>jar</packaging>
                                    <generatePom>true</generatePom>
                                    <url>${nexus.releases.url}</url>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <file>target/${project.artifactId}-${project.version}.jar</file>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This profile deploys the parent pom to nexus releases repository -->
        <profile>
            <id>deploy-pom-nexus-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy-parent</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy-file</goal>
                                </goals>
                                <configuration>
                                    <repositoryId>danta-releases</repositoryId>
                                    <packaging>pom</packaging>
                                    <generatePom>true</generatePom>
                                    <url>${nexus.releases.url}</url>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <file>pom.xml</file>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- This profile deploys a ZIP to nexus releases repository -->
        <profile>
            <id>deploy-zip-nexus-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy-package</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>deploy-file</goal>
                                </goals>
                                <configuration>
                                    <repositoryId>danta-releases</repositoryId>
                                    <packaging>zip</packaging>
                                    <url>${nexus.releases.url}</url>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <groupId>${project.groupId}</groupId>
                                    <version>${project.version}</version>
                                    <file>target/${project.artifactId}-${project.version}.zip</file>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>with-sources</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>with-javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                    <show>private</show>
                                </configuration>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                           </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>   
        <profile>
            <id>deploy-jahia</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.sling</groupId>
                        <artifactId>maven-sling-plugin</artifactId>
                        <version>2.1.8</version>
                        <executions>
                            <execution>
                                <id>install-bundle</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <slingUrl>${jahia.slingURL}</slingUrl>
                                    <user>${jahia.username}</user>
                                    <password>${jahia.password}</password>
                                    <refreshPackages>true</refreshPackages>
                                    <bundleStartLevel>80</bundleStartLevel>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-sonatype</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <dependencies>
        <!-- handlebars -->
        <dependency>
            <groupId>com.github.jknack</groupId>
            <artifactId>handlebars</artifactId>
            <version>4.0.6</version>
        </dependency>
        <dependency>
            <groupId>com.github.jknack</groupId>
            <artifactId>handlebars-guava-cache</artifactId>
            <version>4.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>4.5.3</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.birt.runtime.3_7_1</groupId>
            <artifactId>org.mozilla.javascript</artifactId>
            <version>[1.6,2)</version>
        </dependency>
        <!-- misc -->
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>asm</artifactId>
            <version>1.0.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.10.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.juffrou</groupId>
            <artifactId>juffrou-reflect</artifactId>
            <version>2.1.5</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>15.0</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>
        <!-- logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.25</version>
        </dependency>
        <!-- testing -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.10.19</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!-- OSGi -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>4.3.1</version>
            <scope>provided</scope>
        </dependency>
        <!-- felix -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
            <version>1.9.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr</artifactId>
            <version>2.0.8</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.http.bundle</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.bundlerepository</artifactId>
            <version>2.0.8</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.compendium</artifactId>
            <version>1.4.0</version>
        </dependency>
        <!-- JavaEE -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>javax.servlet.jsp-api</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- Apache Commons -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math</artifactId>
            <version>2.2</version>
        </dependency>
        <!-- JCR -->
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.2</version>
        </dependency>
        <!-- sling -->
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.scheduler</artifactId>
            <version>2.4.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.commons.osgi</artifactId>
            <version>2.4.0</version>
        </dependency>
        <!-- jackrabbit -->
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-spi</artifactId>
            <version>2.8.0</version>
        </dependency>

        <!-- AEM UBER -->
        <dependency>
            <groupId>com.adobe.aem</groupId>
            <artifactId>uber-jar</artifactId>
            <version>6.2.0</version>
            <classifier>apis</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>danta-nexus</id>
            <name>Danta Repository</name>
            <url>http://repo.tikaltechnologies.io/repository/danta-group/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>danta-nexus</id>
            <name>Danta Repository</name>
            <url>http://repo.tikaltechnologies.io/repository/danta-group/</url>
        </pluginRepository>
    </pluginRepositories>
    <distributionManagement>
        <snapshotRepository>
            <id>danta-snapshots</id>
            <url>${nexus.snapshots.url}</url>
        </snapshotRepository>
        <repository>
            <id>danta-releases</id>
            <url>${nexus.releases.url}</url>
        </repository>
    </distributionManagement>
</project>