<?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>across-base</artifactId>
	<version>1.1.2.RELEASE</version>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>
		Across is a Java framework that aims to facilitate module based development for Java (web) applications.
		It builds heavily on Spring framework and allows defining a module consisting of a number of classes and
		configuration files. Every module defines its own Spring application context and can share one or more beans
		with other modules.
	</description>
	<url>https://foreach.atlassian.net/wiki/display/AX</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>
			<email>arne at foreach.be</email>
			<organization>Foreach</organization>
			<organizationUrl>http://www.foreach.be</organizationUrl>
		</developer>
	</developers>

	<properties>
		<across.version>1.1.2.RELEASE</across.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<spring.platform.version>1.1.5.RELEASE</spring.platform.version>
		<foreach.common.version>0.12</foreach.common.version>
		<querydsl.version>3.5.1</querydsl.version>
		<hikaricp.version>2.3.9</hikaricp.version>
		<jacoco-maven-plugin.version>0.7.4.201502262128</jacoco-maven-plugin.version>
	</properties>

	<repositories>
		<repository>
			<id>foreach-nexus</id>
			<name>Foreach nexus</name>
			<url>http://repository.foreach.be/nexus/content/groups/public/</url>
		</repository>
	</repositories>

	<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-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>
						<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.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<version>1.5.0</version>
				<inherited>false</inherited>
				<configuration>
					<sourceDirectory>docs</sourceDirectory>
					<sourceDocumentName>index.adoc</sourceDocumentName>
					<doctype>book</doctype>
					<outputDirectory>${project.build.directory}/site/${project.version}/reference</outputDirectory>
					<backend>html</backend>
					<attributes>
						<stylesheet>across.css</stylesheet>
					</attributes>
				</configuration>
				<executions>
					<execution>
						<id>output-html</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>process-asciidoc</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>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.5.3</version>
				<inherited>false</inherited>
				<configuration>
					<finalName>${project.artifactId}</finalName>
					<descriptors>
						<descriptor>docs/assembly.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<!-- this is used for inheritance merges -->
						<phase>package</phase>
						<!-- bind to the packaging phase -->
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.17</version>
				<configuration>
					<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.surefire</groupId>
						<artifactId>surefire-junit47</artifactId>
						<version>2.17</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco-maven-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>2.6</version>
			</plugin>
		</plugins>
	</build>

	<modules>
		<module>across-core</module>
		<module>across-web</module>
		<module>across-test</module>
	</modules>

	<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>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.spring.platform</groupId>
				<artifactId>platform-bom</artifactId>
				<version>${spring.platform.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- Specific versions -->
			<dependency>
				<groupId>org.liquibase</groupId>
				<artifactId>liquibase-core</artifactId>
				<version>3.1.0</version>
				<exclusions>
					<exclusion>
						<artifactId>jetty-servlet</artifactId>
						<groupId>org.eclipse.jetty</groupId>
					</exclusion>
					<exclusion>
						<artifactId>velocity</artifactId>
						<groupId>org.apache.velocity</groupId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- Non-spring managed -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-collections4</artifactId>
				<version>4.0</version>
			</dependency>
			<dependency>
				<groupId>com.mattbertolini</groupId>
				<artifactId>liquibase-slf4j</artifactId>
				<version>1.2.1</version>
				<exclusions>
					<exclusion>
						<groupId>org.liquibase</groupId>
						<artifactId>liquibase-core</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.slf4j</groupId>
						<artifactId>slf4j-api</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>net.engio</groupId>
				<artifactId>mbassador</artifactId>
				<version>1.2.0</version>
				<exclusions>
					<exclusion>
						<groupId>javax.el</groupId>
						<artifactId>el-api</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>mysql</groupId>
				<artifactId>mysql-connector-java</artifactId>
				<version>5.1.31</version>
			</dependency>
			<dependency>
				<groupId>com.zaxxer</groupId>
				<artifactId>HikariCP-java6</artifactId>
				<version>${hikaricp.version}</version>
			</dependency>
			<dependency>
				<groupId>com.oracle</groupId>
				<artifactId>ojdbc6</artifactId>
				<version>11.2.0</version>
			</dependency>
			<dependency>
				<groupId>net.sourceforge.jtds</groupId>
				<artifactId>jtds</artifactId>
				<version>1.3.1</version>
			</dependency>

			<!-- Hibernate 4.3 and JPA 2.1 still not supported due to JBoss -->
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-core</artifactId>
				<version>4.2.14.Final</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-entitymanager</artifactId>
				<version>4.2.14.Final</version>
			</dependency>
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-validator</artifactId>
				<!-- Version 5.x.x has issues on Jboss with javax.validation.api 1.1.0 -->
				<version>4.3.2.Final</version>
			</dependency>
			<dependency>
				<groupId>org.jboss.logging</groupId>
				<artifactId>jboss-logging</artifactId>
				<version>3.1.3.GA</version>
			</dependency>

			<dependency>
				<groupId>javax.validation</groupId>
				<artifactId>validation-api</artifactId>
				<version>1.0.0.GA</version>
			</dependency>

			<dependency>
				<groupId>cglib</groupId>
				<artifactId>cglib</artifactId>
				<version>3.1</version>
			</dependency>

			<!-- Foreach commons -->
			<dependency>
				<groupId>com.foreach.libs</groupId>
				<artifactId>common-concurrent</artifactId>
				<version>${foreach.common.version}</version>
			</dependency>
			<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-mybatis</artifactId>
				<version>${foreach.common.version</version>
			</dependency>
			<dependency>
				<groupId>com.foreach.libs</groupId>
				<artifactId>text-synchronizer</artifactId>
				<version>1.0</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>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<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>http://repository.foreach.be/nexus/content/repositories/releases</url>
				</repository>
				<snapshotRepository>
					<id>foreach-nexus</id>
					<name>Foreach nexus</name>
					<url>http://repository.foreach.be/nexus/content/repositories/snapshots</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
	</profiles>

</project>