<!-- ~ Copyright (C) 2013 Premium Minds. ~ ~ This file is part of billy.
	~ ~ billy is free software: you can redistribute it and/or modify ~ it under
	the terms of the GNU Lesser General Public License as published ~ by the
	Free Software Foundation, either version 3 of the License, or ~ (at your
	option) any later version. ~ ~ billy 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 Lesser
	General Public License for more details. ~ ~ You should have received a copy
	of the GNU Lesser General Public License ~ along with billy. If not, see
	<http://www.gnu.org/licenses />. -->
<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>
	<artifactId>billy</artifactId>
	<name>billy</name>
	<version>7.0.0</version>
	<description>An opensource invoicing engine</description>
	<packaging>pom</packaging>
	<groupId>com.premiumminds</groupId>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<main.dir>${basedir}</main.dir>
		<java.version>1.8</java.version>
		<guice.version>5.1.0</guice.version>
		<querydsl.version>5.0.0</querydsl.version>
		<hibernate.version>5.6.12.Final</hibernate.version>
	</properties>

	<modules>
		<module>billy-core</module>
		<module>billy-core-jpa</module>
		<module>billy-gin</module>
		<module>billy-portugal</module>
		<module>billy-spain</module>
		<module>billy-france</module>
	</modules>

	<licenses>
		<license>
			<name>GNU LESSER GENERAL PUBLIC LICENSE</name>
			<url>http://www.gnu.org/licenses/lgpl.html</url>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:premium-minds/billy.git</connection>
		<developerConnection>scm:git:git@github.com:premium-minds/billy.git</developerConnection>
		<url>https://github.com/premium-minds/billy</url>
	 	<tag>v7.0.0</tag>
  	</scm>

	<url>http://premium-minds.github.io/billy/</url>

	<developers>
		<developer>
			<name>Filipe Roxo</name>
			<organization>Premium Minds</organization>
		</developer>
	</developers>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>2.0.3</version>
			</dependency>

			<!-- PERSISTENCE -->
			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-core</artifactId>
				<version>${hibernate.version}</version>
				<scope>provided</scope>
			</dependency>

			<dependency>
				<groupId>org.hibernate</groupId>
				<artifactId>hibernate-envers</artifactId>
				<version>${hibernate.version}</version>
				<scope>provided</scope>
			</dependency>


			<!-- GUICE -->
			<dependency>
				<groupId>com.google.inject</groupId>
				<artifactId>guice</artifactId>
				<version>${guice.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.inject.extensions</groupId>
				<artifactId>guice-persist</artifactId>
				<version>${guice.version}</version>
			</dependency>

			<dependency>
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcpkix-jdk15on</artifactId>
				<version>1.70</version>
			</dependency>


			<!-- SnakeYaml -->
			<dependency>
				<groupId>org.yaml</groupId>
				<artifactId>snakeyaml</artifactId>
				<version>1.33</version>
			</dependency>

			<!-- TEST -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>5.9.1</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>4.8.1</version>
			</dependency>

			<!-- H2 -->
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>2.1.214</version>
			</dependency>

			<dependency>
				<groupId>org.apache.pdfbox</groupId>
				<artifactId>pdfbox</artifactId>
				<version>2.0.27</version>
			</dependency>

		</dependencies>
	</dependencyManagement>

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

	<build>
		<plugins>
			<plugin>
				<inherited>true</inherited>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>4.1</version>
				<configuration>
					<header>${main.dir}/share/licence-preamble.txt</header>
					<strictCheck>true</strictCheck>
					<failIfMissing>true</failIfMissing>
					<includes>
						<include>src/**</include>
						<include>**/test/**</include>
					</includes>
					<excludes>
						<exclude>target/**</exclude>
						<exclude>**/test/resources/keys/**</exclude>
					</excludes>
					<mapping>
						<java>SLASHSTAR_STYLE</java>
						<yml>SCRIPT_STYLE</yml>
					</mapping>
					<properties>
						<project-name>${project.name}</project-name>
						<year>2017</year>
						<owner>Premium Minds</owner>
					</properties>
				</configuration>
				<executions>
					<execution>
						<id>format-headers</id>
						<phase>compile</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.4.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<tagNameFormat>v@{project.version}</tagNameFormat>
					<goals>deploy</goals>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.13.0</version>
					</dependency>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-api</artifactId>
						<version>1.13.0</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<parallel>all</parallel>
					<runOrder>random</runOrder>
					<systemProperties>
						<property>
							<name>java.util.logging.config.file</name>
							<value>src/test/resources/logging.properties</value>
						</property>
					</systemProperties>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.22.2</version>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.diffplug.spotless</groupId>
				<artifactId>spotless-maven-plugin</artifactId>
				<version>2.27.2</version>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<java>
						<indent>
							<spaces>true</spaces>
						</indent>
					</java>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.jvnet.jaxb2.maven2</groupId>
					<artifactId>maven-jaxb2-plugin</artifactId>
					<version>0.15.1</version>
				</plugin>
				<plugin>
					<groupId>com.mysema.maven</groupId>
					<artifactId>apt-maven-plugin</artifactId>
					<version>1.1.3</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.10.1</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
					</configuration>
				</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>
											com.mycila.maven-license-plugin
										</groupId>
										<artifactId>
											maven-license-plugin
										</artifactId>
										<versionRange>
											[1.10.b1,)
										</versionRange>
										<goals>
											<goal>format</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											exec-maven-plugin
										</artifactId>
										<versionRange>
											[1.1.1,)
										</versionRange>
										<goals>
											<goal>java</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!-- OSS Sonatype stuff -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>premiumminds-nexus-staging</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
