<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2007-2020 Crafter Software Corporation. All Rights Reserved.
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License version 3 as published by
  ~ the Free Software Foundation.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.craftercms</groupId>
    <artifactId>crafter-commons</artifactId>
    <packaging>pom</packaging>
    <version>3.1.21E</version><!-- craftercms version flag -->

    <modules>
        <module>utilities</module>
        <module>security</module>
        <module>mongo</module>
        <module>ebus</module>
        <module>audit</module>
        <module>git</module>
        <module>entitlements</module>
        <module>validation</module>
        <module>plugin</module>
        <module>upgrade-manager</module>
    </modules>

    <name>Crafter Commons Enterprise</name>
    <description>Crafter Commons Enterprise</description>
    <url>https://github.com/craftersoftware/commons</url>

    <organization>
        <name>CrafterCMS</name>
        <url>http://craftercms.org</url>
    </organization>

    <licenses>
        <license>
            <name>GNU GENERAL PUBLIC LICENSE, Version 3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>sumerjabri</id>
            <name>Sumer Jabri</name>
            <email>sumer.jabri@craftercms.org</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/craftersoftware/commons</connection>
        <developerConnection>scm:git:git://github.com/craftersoftware/commons</developerConnection>
        <url>scm:git:git://github.com/craftersoftware/commons</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Dependency Version Numbers -->
        <spring.version>4.3.18.RELEASE</spring.version>
        <spring.security.saml.version>1.0.9.RELEASE</spring.security.saml.version>
        <commons.lang3.version>3.5</commons.lang3.version>
        <commons.collections4.version>4.1</commons.collections4.version>
        <commons.collections.version>3.2.2</commons.collections.version>
        <commons.codec.version>1.9</commons.codec.version>
        <commons.beanutils.version>1.9.4</commons.beanutils.version>
        <commons.io.version>2.5</commons.io.version>
        <commons.configuration.version>2.7</commons.configuration.version>
        <commons.cli.version>1.4</commons.cli.version>
        <commons.text.version>1.8</commons.text.version>
        <slf4j.version>1.7.7</slf4j.version>
        <servlet.api.version>3.0.1</servlet.api.version>
        <javax.mail.version>1.6.2</javax.mail.version>
        <freemarker.version>2.3.31</freemarker.version>
        <jackson.version>2.10.5</jackson.version>
        <jackson.databind.version>2.10.5</jackson.databind.version>
        <mongo.version>3.5.0</mongo.version>
        <jongo.version>1.4.0</jongo.version>
        <ehcache.version>2.10.9.2</ehcache.version>
        <aspectj.version>1.7.2</aspectj.version>
        <junit.version>4.12</junit.version>
        <mockito.version>1.9.5</mockito.version>
        <jsonpath.version>2.2.0</jsonpath.version>
        <reactor.version>1.0.0.RELEASE</reactor.version>
        <quartz.version>2.3.2</quartz.version>
        <jgit.version>5.13.0.202109080827-r</jgit.version>
        <snakeyaml.version>1.17</snakeyaml.version>
        <bouncycastle.version>1.61</bouncycastle.version>
        <java.version>1.8</java.version>
	<aws.version>1.12.139</aws.version>
	<box.sdk.version>2.58.0</box.sdk.version>
        <sardine.version>5.10</sardine.version>
        <validation.version>2.0.1.Final</validation.version>

        <!-- Sonar -->
        <sonar.language>java</sonar.language>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.jacoco.reportPath>${basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
        <!-- Commented out because there are no integrations tests -->
        <!--sonar.jacoco.itReportPath>${basedir}/../target/itjacoco.exec</sonar.jacoco.itReportPath-->
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.1.201405082137</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.17</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.17</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.codehaus.mojo
                                        </groupId>
                                        <artifactId>
                                            buildnumber-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.2,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                create-timestamp
                                            </goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                            <goal>create-timestamp</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <revisionOnScmFailure>unknown</revisionOnScmFailure>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Build>${buildNumber}</Implementation-Build>
                            <Build-On>${timestamp}</Build-On>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <activation>
                <property>
                    <name>coverage</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <configuration>
                            <destFile>${sonar.jacoco.reportPath}</destFile>
                            <dataFile>${sonar.jacoco.reportPath}</dataFile>
                            <propertyName>jacoco.agent.arg</propertyName>
                        </configuration>
                        <executions>
                            <execution>
                                <id>pre-junit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>post-test</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>${jacoco.agent.arg}</argLine>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <argLine>${jacoco.agent.arg}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>JDK8</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.7</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
