<?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">

    <parent>
        <groupId>com.icfolson.aem</groupId>
        <artifactId>parent</artifactId>
        <version>6.2.1</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.icfolson.aem.groovy.console</groupId>
    <artifactId>aem-groovy-console</artifactId>
    <packaging>jar</packaging>
    <version>9.0.0</version>
    <name>AEM Groovy Console</name>
    <description>
        The AEM Groovy Console provides an interface for running Groovy scripts in the AEM (Adobe CQ) container. Scripts
        can be created to manipulate content in the JCR, call OSGi services, or execute arbitrary code using the AEM,
        Sling, or JCR APIs.
    </description>

    <organization>
        <name>ICF Olson</name>
        <url>http://www.icfolson.com</url>
    </organization>

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

    <scm>
        <connection>scm:git:git@github.com:Citytechinc/cq-groovy-console.git</connection>
        <developerConnection>scm:git:git@github.com:Citytechinc/cq-groovy-console.git</developerConnection>
        <url>https://github.com/Citytechinc/cq-groovy-console</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/Citytechinc/cq-groovy-console/issues</url>
    </issueManagement>

    <repositories>
        <repository>
            <id>citytech-public</id>
            <url>http://nexus.citytech.ctmsp.com/content/groups/public</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>citytech-public</id>
            <url>http://nexus.citytech.ctmsp.com/content/groups/public</url>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss.SSSZ</maven.build.timestamp.format>
        <timestamp>${maven.build.timestamp}</timestamp>
        <aem.package.goal>install</aem.package.goal>
        <aem.username>admin</aem.username>
        <aem.context.path/>
        <osgi.bundle.status.skip.publish>true</osgi.bundle.status.skip.publish>
        <assembly.descriptor.name>zip.xml</assembly.descriptor.name>
    </properties>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <aem.package.skip>true</aem.package.skip>
                <osgi.bundle.status.skip>true</osgi.bundle.status.skip>
            </properties>
        </profile>
        <profile>
            <id>exclude-groovy-bundle</id>
            <activation>
                <property>
                    <name>exclude-groovy-bundle</name>
                </property>
            </activation>
            <properties>
                <assembly.descriptor.name>zip-exclude-groovy-bundle.xml</assembly.descriptor.name>
            </properties>
        </profile>
        <profile>
            <id>local</id>
            <activation>
                <property>
                    <name>local</name>
                </property>
            </activation>
            <properties>
                <aem.host>localhost</aem.host>
                <aem.port.author>4502</aem.port.author>
                <aem.port.publish>4503</aem.port.publish>
                <aem.username>admin</aem.username>
                <aem.password>admin</aem.password>
            </properties>
        </profile>
        <profile>
            <id>replicate</id>
            <activation>
                <property>
                    <name>replicate</name>
                </property>
            </activation>
            <properties>
                <aem.package.goal>replicate</aem.package.goal>
                <osgi.bundle.status.skip.publish>false</osgi.bundle.status.skip.publish>
            </properties>
        </profile>
    </profiles>

    <build>
        <sourceDirectory>src/main/groovy</sourceDirectory>
        <testSourceDirectory>src/test/groovy</testSourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5</version>
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>utf-8</encoding>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.9.2-01</version>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-batch</artifactId>
                        <version>2.4.3-01</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <includes>
                        <include>**/*Spec*</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
                <version>1.21.0</version>
                <executions>
                    <execution>
                        <id>generate-scr-scrdescriptor</id>
                        <goals>
                            <goal>scr</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scanClasses>true</scanClasses>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.0.1</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
                        <Export-Package>!*.impl,com.icfolson.aem.groovy.console.*</Export-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/${assembly.descriptor.name}</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                    <execution>
                        <id>javadoc</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/javadoc.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.citytechinc.maven.plugins</groupId>
                <artifactId>cq-package-maven-plugin</artifactId>
                <version>0.3.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>${aem.package.goal}</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <host>${aem.host}</host>
                    <port>${aem.port.author}</port>
                    <contextPath>${aem.context.path}</contextPath>
                    <username>${aem.username}</username>
                    <password>${aem.password}</password>
                    <skip>${aem.package.skip}</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.citytechinc.maven.plugins</groupId>
                <artifactId>osgi-bundle-status-maven-plugin</artifactId>
                <version>1.3.0</version>
                <executions>
                    <execution>
                        <id>status-author</id>
                        <phase>package</phase>
                        <goals>
                            <goal>status</goal>
                        </goals>
                        <configuration>
                            <bundleNames>
                                <bundleName>aem-groovy-extension-bundle</bundleName>
                                <bundleName>aem-groovy-console</bundleName>
                            </bundleNames>
                            <host>${aem.host}</host>
                            <port>${aem.port.author}</port>
                            <contextPath>${aem.context.path}</contextPath>
                            <username>${aem.username}</username>
                            <password>${aem.password}</password>
                        </configuration>
                    </execution>
                    <execution>
                        <id>status-publish</id>
                        <phase>package</phase>
                        <goals>
                            <goal>status</goal>
                        </goals>
                        <configuration>
                            <bundleNames>
                                <bundleName>aem-groovy-extension-bundle</bundleName>
                                <bundleName>aem-groovy-console</bundleName>
                            </bundleNames>
                            <host>${aem.host}</host>
                            <port>${aem.port.publish}</port>
                            <contextPath>${aem.context.path}</contextPath>
                            <username>${aem.username}</username>
                            <password>${aem.password}</password>
                            <skip>${osgi.bundle.status.skip.publish}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.1</version>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- inherited -->
        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.jcr.api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.adobe.granite.sling</groupId>
            <artifactId>org.apache.sling.jcr.resource</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.scripting.jsp.taglib</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.cq</groupId>
            <artifactId>cq-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.commons</groupId>
            <artifactId>day-commons-text</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.cq</groupId>
            <artifactId>cq-search</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.cq</groupId>
            <artifactId>cq-mailer</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-taglib</artifactId>
        </dependency>
        <dependency>
            <groupId>com.adobe.granite</groupId>
            <artifactId>com.adobe.granite.replication.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.day.commons.osgi.wrapper</groupId>
            <artifactId>com.day.commons.osgi.wrapper.commons-email</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>jackrabbit-api</artifactId>
        </dependency>

        <!-- compile -->
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
            <version>1.9.12</version>
        </dependency>

        <!-- provided -->
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.4.7</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.icfolson.aem.groovy.extension</groupId>
            <artifactId>aem-groovy-extension-bundle</artifactId>
            <version>2.0.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>com.icfolson.aem.prosper</groupId>
            <artifactId>prosper</artifactId>
            <version>8.0.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
