<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright 2016 - 2019 Acosix GmbH

 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.
 -->
<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.3.0-SNAPSHOT</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>

        <!-- Only target Java 7 to support any builds in backporting branches for Alfresco 4.2/5.0 -->
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>

        <maven.versions.version>2.7</maven.versions.version>
        <maven.enforcer.version>1.4.1</maven.enforcer.version>
        <maven.clean.version>3.1.0</maven.clean.version>
        <maven.resources.version>3.1.0</maven.resources.version>
        <maven.dependency.version>3.1.1</maven.dependency.version>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.source.version>3.2.0</maven.source.version>
        <maven.javadoc.version>3.1.1</maven.javadoc.version>
        <maven.jar.version>3.2.0</maven.jar.version>
        <maven.toolchain.version>3.0.0</maven.toolchain.version>
        <maven.forbiddenapis.version>2.7</maven.forbiddenapis.version>
        <maven.assembly.version>3.2.0</maven.assembly.version>
        <maven.war.version>3.2.3</maven.war.version>
        <maven.alfresco.version>1.1.1</maven.alfresco.version>
        <maven.findbugs.version>3.0.5</maven.findbugs.version>
        <maven.surefire.version>2.22.2</maven.surefire.version>
        <maven.failsafe.version>2.22.2</maven.failsafe.version>
        <maven.install.version>2.5.2</maven.install.version>
        <maven.deploy.version>2.8.2</maven.deploy.version>
        <maven.helper.version>3.0.0</maven.helper.version>
        <maven.gmaven.version>2.1.1</maven.gmaven.version>

        <maven.acosix.jshint.version>1.1.0</maven.acosix.jshint.version>
        <maven.acosix.i18n.version>1.0.4</maven.acosix.i18n.version>

        <maven.alchim.yuicompressor.version>1.5.1</maven.alchim.yuicompressor.version>

        <maven.oss.staging.version>1.6.8</maven.oss.staging.version>

        <maven.plugin.version>3.6.0</maven.plugin.version>
        <maven.plugin.api.version>${maven.plugin.version}</maven.plugin.api.version>
        <maven.artifact.version>${maven.plugin.version}</maven.artifact.version>
        <maven.archiver.version>3.3.0</maven.archiver.version>
        <plexus.archiver.version>${maven.plugin.version}</plexus.archiver.version>

        <fabric8io.docker.version>0.31.0</fabric8io.docker.version>

        <junit.version>4.12</junit.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>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${maven.versions.version}</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.version}</version>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>[3.5,)</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven.clean.version}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven.resources.version}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.version}</version>
                </plugin>

                <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>
                    <executions>
                        <execution>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </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>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${maven.oss.staging.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven.failsafe.version}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven.install.version}</version>
                </plugin>

                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven.deploy.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${maven.helper.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.gmaven</groupId>
                    <artifactId>groovy-maven-plugin</artifactId>
                    <version>${maven.gmaven.version}</version>
                </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>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-plugin-plugin</artifactId>
                                        <versionRange>[${maven.plugin.version},)</versionRange>
                                        <goals>
                                            <goal>descriptor</goal>
                                            <goal>helpmojo</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>de.acosix.alfresco.maven.definitions</module>
        <module>de.acosix.alfresco.maven.plugins</module>
        <module>de.acosix.alfresco.maven.project.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>