<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2014 the original author or authors

  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>com.foreach.across</groupId>
	<artifactId>standard-module-bom</artifactId>
	<version>3.2.1.RELEASE</version>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>
		Base BOM pom for creating an Across Standard Module or any module wishing to adhere to the
		standard module conventions.
	</description>
	<url>https://across.dev</url>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Arne Vandamme</name>
			<organization>Foreach</organization>
			<organizationUrl>https://www.foreach.be</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://bitbucket.org/beforeach/across.git</connection>
		<developerConnection>scm:git:https://bitbucket.org/beforeach/across.git</developerConnection>
		<url>https://bitbucket.org/beforeach/across</url>
	</scm>

	<properties>
		<across.version>3.2.1.RELEASE</across.version>
		<foreach.common.version>1.1</foreach.common.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<querydsl.version>4.1.4</querydsl.version>
		<maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
	</properties>

	<repositories>
		<repository>
			<id>foreach-nexus</id>
			<name>Foreach nexus</name>
			<url>https://repository.foreach.be/nexus/repository/public/</url>
		</repository>
	</repositories>

	<dependencyManagement>
		<dependencies>
			<!-- Parent BOMs -->
			<dependency>
				<groupId>com.foreach.across</groupId>
				<artifactId>across-base</artifactId>
				<version>${across.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<!-- Across core -->
			<dependency>
				<groupId>com.foreach.across</groupId>
				<artifactId>across-core</artifactId>
				<version>${across.version}</version>
			</dependency>
			<dependency>
				<groupId>com.foreach.across</groupId>
				<artifactId>across-test</artifactId>
				<version>${across.version}</version>
			</dependency>
			<dependency>
				<groupId>com.foreach.across</groupId>
				<artifactId>across-web</artifactId>
				<version>${across.version}</version>
			</dependency>

			<!-- Non-spring managed -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-collections4</artifactId>
				<version>4.1</version>
			</dependency>
			<dependency>
				<groupId>cglib</groupId>
				<artifactId>cglib</artifactId>
				<version>3.1</version>
			</dependency>

			<!-- Foreach commons -->
			<dependency>
				<groupId>com.foreach.libs</groupId>
				<artifactId>common-spring</artifactId>
				<version>${foreach.common.version}</version>
			</dependency>
			<dependency>
				<groupId>com.foreach.libs</groupId>
				<artifactId>common-web</artifactId>
				<version>${foreach.common.version}</version>
			</dependency>
			<dependency>
				<groupId>com.foreach.libs</groupId>
				<artifactId>common-test</artifactId>
				<version>${foreach.common.version}</version>
				<exclusions>
					<exclusion>
						<groupId>org.mockito</groupId>
						<artifactId>mockito-all</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Build-Time>${maven.build.timestamp}</Build-Time>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<configuration>
					<failOnError>false</failOnError>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
					<execution>
						<inherited>true</inherited>
						<id>aggregate</id>
						<goals>
							<goal>aggregate</goal>
						</goals>
						<phase>prepare-package</phase>
						<configuration>
							<reportOutputDirectory>${project.reporting.outputDirectory}</reportOutputDirectory>
							<destDir>${project.version}/javadoc</destDir>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.22.1</version>
				<configuration>
					<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.mysema.maven</groupId>
					<artifactId>apt-maven-plugin</artifactId>
					<version>1.1.3</version>
					<executions>
						<execution>
							<goals>
								<goal>process</goal>
							</goals>
							<phase>generate-sources</phase>
							<configuration>
								<outputDirectory>target/generated-sources/java</outputDirectory>
								<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
							</configuration>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>com.querydsl</groupId>
							<artifactId>querydsl-apt</artifactId>
							<optional>true</optional>
							<version>${querydsl.version}</version>
						</dependency>
						<dependency>
							<groupId>com.querydsl</groupId>
							<artifactId>querydsl-jpa</artifactId>
							<classifier>apt</classifier>
							<version>${querydsl.version}</version>
						</dependency>
					</dependencies>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>sonatype</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<snapshotRepository>
					<id>sonatype</id>
					<name>Sonatype snapshots</name>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>sonatype</id>
					<name>Sonatype release staging</name>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
				</repository>
			</distributionManagement>
		</profile>
		<profile>
			<id>foreach</id>
			<distributionManagement>
				<repository>
					<id>foreach-nexus</id>
					<name>Foreach nexus</name>
					<url>https://repository.foreach.be/nexus/repository/across-releases/</url>
				</repository>
				<snapshotRepository>
					<id>foreach-nexus</id>
					<name>Foreach nexus</name>
					<url>https://repository.foreach.be/nexus/repository/across-snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
	</profiles>

</project>
