<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.acosix.alfresco.maven</groupId>
    <artifactId>de.acosix.alfresco.maven.parent</artifactId>
    <version>1.0.0.3</version>
    <packaging>pom</packaging>
    <name>Acosix Alfresco Maven Parent</name>
    <description>Parent POM for Acosix Alfresco Maven Support</description>
    <url>https://github.com/Acosix/alfresco-maven</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:Acosix/alfresco-maven.git</connection>
        <developerConnection>scm:git:git@github.com:Acosix/alfresco-maven.git</developerConnection>
        <url>git@github.com:Acosix/alfresco-maven.git</url>
    </scm>

    <developers>
        <developer>
            <id>AFaust</id>
            <name>Axel Faust</name>
            <email>axel.faust@acosix.de</email>
            <organization>Acosix GmbH</organization>
            <roles>
                <role>Founder</role>
                <role>Architect</role>
                <role>Developer</role>
            </roles>
            <properties>
                <twitter>twitter.com/ReluctantBird83</twitter>
            </properties>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Java 7 is out of support - everything will be built for Java 8 by default even if Alfresco up to 5.0 officially supports Java 7 -->
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <maven.enforcer.version>1.4.1</maven.enforcer.version>
        <maven.compiler.version>3.6.1</maven.compiler.version>
        <maven.source.version>3.0.1</maven.source.version>
        <maven.javadoc.version>2.10.4</maven.javadoc.version>
        <maven.jar.version>3.0.2</maven.jar.version>
        <maven.resources.version>3.0.1</maven.resources.version>
        <maven.toolchain.version>1.1</maven.toolchain.version>
        <maven.plugin.version>3.5</maven.plugin.version>
        <maven.forbiddenapis.version>2.2</maven.forbiddenapis.version>
        <maven.assembly.version>2.6</maven.assembly.version>
        <maven.alfresco.version>1.1.1</maven.alfresco.version>
        <maven.jslint.version>2.0.5</maven.jslint.version>
        <maven.jshint.version>1.6.0</maven.jshint.version>
        <maven.acosix.jshint.version>1.0.0</maven.acosix.jshint.version>
        <maven.findbugs.version>3.0.4</maven.findbugs.version>

        <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
    </properties>

    <repositories>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>alfresco-public</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
        </repository>

        <repository>
            <id>alfresco-public-snapshots</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>alfresco-public</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
        </pluginRepository>
        <pluginRepository>
            <id>alfresco-public-snapshots</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <source>${maven.compiler.target}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadoc</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.version}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${maven.plugin.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>${maven.toolchain.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>toolchain</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <toolchains>
                            <jdk>
                                <version>${maven.compiler.target}</version>
                            </jdk>
                        </toolchains>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>${maven.forbiddenapis.version}</version>
                    <configuration>
                        <failOnUnsupportedJava>false</failOnUnsupportedJava>
                        <failOnMissingClasses>false</failOnMissingClasses>
                        <failOnUnresolvableSignatures>false</failOnUnresolvableSignatures>
                        <bundledSignatures>
                            <bundledSignature>jdk-unsafe</bundledSignature>
                            <bundledSignature>jdk-deprecated</bundledSignature>
                            <bundledSignature>jdk-internal</bundledSignature>
                            <bundledSignature>jdk-system-out</bundledSignature>
                            <bundledSignature>jdk-non-portable</bundledSignature>
                            <bundledSignature>jdk-reflection</bundledSignature>
                        </bundledSignatures>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                                <goal>testCheck</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <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>
                
                <!--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.maven.plugins</groupId>
                                        <artifactId>maven-toolchains-plugin</artifactId>
                                        <versionRange>[${maven.toolchain.version},)</versionRange>
                                        <goals>
                                            <goal>toolchain</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <modules>
        <module>de.acosix.alfresco.maven.definitions</module>
        <module>de.acosix.alfresco.maven.plugins</module>
        <module>de.acosix.alfresco.maven.module.parent</module>
    </modules>

    <profiles>
        <profile>
            <id>Toolchains</id>

            <activation>
                <file>
                    <exists>${user.home}/.m2/toolchains.xml</exists>
                </file>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-toolchains-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <useAgent>false</useAgent>
                            <keyname>${gpg.keyname}</keyname>
                            <passphraseServerId>${gpg.keyname}</passphraseServerId>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>