<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.composum.dashboard</groupId>
    <artifactId>composum-dashboard</artifactId>
    <version>1.2.2</version>
    <packaging>pom</packaging>

    <name>Composum Dashboard</name>
    <description>a framework for creating a custom project toolset that is placed on a dasboard page</description>
    <url>https://github.com/ist-dresden/composum</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Hans-Peter Störr</name>
            <email>hp.stoerr@ist-software.com</email>
            <organization>IST GmbH Dresden</organization>
            <organizationUrl>http://www.ist-software.com</organizationUrl>
        </developer>
        <developer>
            <name>Ralf Wunsch</name>
            <email>r.wunsch@ist-software.com</email>
            <organization>IST GmbH Dresden</organization>
            <organizationUrl>http://www.ist-software.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <package.group>com.composum.dashboard</package.group>
        <release.repository.id>ossrh</release.repository.id>
        <release.repository.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repository.url>
        <install.path>/apps/composum/dashboard/install</install.path>
        <node.version>v12.18.3</node.version>
        <java.source>11</java.source>
        <java.target>11</java.target>
        <maven.compiler.source>${java.source}</maven.compiler.source>
        <maven.compiler.target>${java.target}</maven.compiler.target>
        <sling.pckgmgr.url>/bin/cpm/package.service.html</sling.pckgmgr.url>
    </properties>

    <scm>
        <connection>scm:git:https://github.com/ist-dresden/composum.git</connection>
        <developerConnection>scm:git:https://github.com/ist-dresden/composum.git</developerConnection>
        <url>https://github.com/ist-dresden/composum.git</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>${release.repository.id}</id>
            <url>${release.repository.url}</url>
        </repository>
        <snapshotRepository>
            <id>istrepo</id>
            <url>https://repo.ist-software.com/repository/maven-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <modules>
        <module>sling</module>
        <module>aem</module>
    </modules>

    <profiles>

        <profile>
            <!-- profile to release the artifacts for the public repository -->
            <id>nexus-staging</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>${release.repository.id}</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>info@composum.com</keyname>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>

    </profiles>
    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>${java.source}</source>
                        <target>${java.target}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>5.1.4</version>
                    <extensions>true</extensions>
                </plugin>

                <plugin>
                    <groupId>org.commonjava.maven.plugins</groupId>
                    <artifactId>directory-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>directories</id>
                            <goals>
                                <goal>highest-basedir</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <property>nodepath</property>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.jackrabbit</groupId>
                    <artifactId>filevault-package-maven-plugin</artifactId>
                    <version>1.3.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <group>${package.group}</group>
                        <name>${project.artifactId}</name>
                        <failOnMissingEmbed>true</failOnMissingEmbed>
                        <embeddedTarget>${install.path}</embeddedTarget>
                        <validatorsSettings>
                            <jackrabbit-filter>
                                <options>
                                    <validRoots>/apps,/apps/composum,/apps/composum/dashboard,/apps/composum/dashboard/install</validRoots>
                                </options>
                            </jackrabbit-filter>
                            <jackrabbit-packagetype>
                                <options>
                                    <allowComplexFilterRulesInApplicationPackages>true</allowComplexFilterRulesInApplicationPackages>
                                </options>
                            </jackrabbit-packagetype>
                        </validatorsSettings>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>io.wcm.maven.plugins</groupId>
                    <artifactId>wcmio-content-package-maven-plugin</artifactId>
                    <version>2.0.4</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serviceURL>http://${sling.host}:${sling.port}${sling.pckgmgr.url}</serviceURL>
                        <userId>${sling.user}</userId>
                        <password>${sling.password}</password>
                        <bundleStatusURL>-</bundleStatusURL>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>
    <dependencyManagement>
        <dependencies>

            <!-- Sling... -->
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.models.api</artifactId>
                <version>1.3.6</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.api</artifactId>
                <version>2.18.4</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.caconfig.api</artifactId>
                <version>1.3.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.commons.classloader</artifactId>
                <version>1.4.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.adapter</artifactId>
                <version>2.1.10</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>adapter-annotations</artifactId>
                <version>1.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.scripting.api</artifactId>
                <version>2.2.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.xss</artifactId>
                <version>2.0.12</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.settings</artifactId>
                <version>1.3.10</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.sling</groupId>
                <artifactId>org.apache.sling.jcr.resource</artifactId>
                <version>3.0.2</version>
                <scope>provided</scope>
            </dependency>

            <!-- JCR API, Jackrabbit, VLT -->
            <dependency>
                <groupId>javax.jcr</groupId>
                <artifactId>jcr</artifactId>
                <version>2.0</version>
                <scope>provided</scope>
            </dependency>

            <!-- Java servlet, web API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>2.1</version>
                <scope>provided</scope>
            </dependency>

            <!-- JSON -->
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.8.5</version>
                <scope>provided</scope>
            </dependency>

            <!-- commons -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.6</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.6</version>
                <scope>provided</scope>
            </dependency>

            <!-- logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.7.25</version>
                <scope>provided</scope>
            </dependency>

            <!-- OSGi, Felix -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>6.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>osgi.cmpn</artifactId>
                <version>6.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.annotation</artifactId>
                <version>6.0.0</version>
                <scope>provided</scope>
            </dependency>

            <!-- Java Annotations -->
            <dependency>
                <groupId>org.jetbrains</groupId>
                <artifactId>annotations</artifactId>
                <version>16.0.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.1</version>
                <scope>provided</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>
</project>
