<?xml version="1.0" encoding="UTF-8"?>
<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.craftercms</groupId>
	<artifactId>crafter-commons</artifactId>
    <packaging>pom</packaging>
    <version>2.5.19</version>

    <modules>
        <module>utilities</module>
        <module>security</module>
        <module>mongo</module>
        <module>ebus</module>
        <module>api-documentation</module>
        <module>audit</module>
        <module>validation</module>
    </modules>

    <name>Crafter Commons</name>
	<description>Crafter Commons</description>
	<url>https://github.com/craftercms/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/craftercms/commons</connection>
		<developerConnection>scm:git:git://github.com/craftercms/commons</developerConnection>
		<url>scm:git:git://github.com/craftercms/core</url>
	</scm>

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

        <!-- Dependency Version Numbers -->
        <spring.version>4.0.3.RELEASE</spring.version>
        <commons.lang3.version>3.4</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.2</commons.beanutils.version>
        <commons.io.version>2.4</commons.io.version>
        <httpcomponents.httpclient.version>4.3.3</httpcomponents.httpclient.version>
        <slf4j.version>1.7.7</slf4j.version>
        <servlet.api.version>3.0.1</servlet.api.version>
        <javax.mail.version>1.4.7</javax.mail.version>
        <freemarker.version>2.3.20</freemarker.version>
        <jackson.version>2.3.2</jackson.version>
        <mongo.version>2.13.0</mongo.version>
        <jongo.version>1.1</jongo.version>
        <ehcache.version>2.8.1</ehcache.version>
        <aspectj.version>1.7.2</aspectj.version>
        <junit.version>4.11</junit.version>
        <mockito.version>1.9.5</mockito.version>
        <jsonpath.version>0.8.1</jsonpath.version>
        <logback.version>1.0.13</logback.version>
        <reactor.version>1.0.0.RELEASE</reactor.version>
        <quartz.version>2.2.1</quartz.version>
        <swagger.springmvc.version>0.8.8</swagger.springmvc.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>

	<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.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</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://oss.sonatype.org/content/repositories/snapshots</url>
	  </snapshotRepository>
	  <repository>
	    <id>sonatype-nexus-staging</id>
	    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	  </repository>
	</distributionManagement>


</project>
