<?xml version="1.0" encoding="UTF-8"?>
<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>info.novatec.testit</groupId>
	<artifactId>livingdoc</artifactId>
	<packaging>pom</packaging>
	<version>1.2.2</version>

	<name>testIT | LivingDoc</name>
	<url>https://github.com/testIT-LivingDoc/livingdoc-core</url>
	<description>LivingDoc is a powerful tool that supports implementing collaboration driven methods like Behavior Driven Development or Specification By Example.</description>
	<inceptionYear>2015</inceptionYear>

	<organization>
		<name>NovaTec Consulting GmbH</name>
		<url>http://www.novatec-gmbh.de</url>
	</organization>

	<licenses>
		<license>
			<name>GNU General Public License, Version 3.0</name>
			<url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:testIT-LivingDoc/livingdoc-core.git</connection>
		<developerConnection>scm:git:git@github.com:testIT-LivingDoc/livingdoc-core.git</developerConnection>
		<url>git@github.com:testIT-LivingDoc/livingdoc-core.git</url>
	</scm>

	<properties>
		<project.root>.</project.root>
		<project.java.version>1.6</project.java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<rules.pmd>${project.root}/development/pmd_rules.xml</rules.pmd>
		<rules.checkstyle>${project.root}/development/checkstyle_rules.xml</rules.checkstyle>
		
		<version.maven.gpg.plugin>1.5</version.maven.gpg.plugin>
		<version.maven.nexus.staging.plugin>1.6.3</version.maven.nexus.staging.plugin>
		
		<version.checkstyle>6.9</version.checkstyle>
		<version.maven.pmd.plugin>3.2</version.maven.pmd.plugin>
		<version.maven.checkstyle.plugin>2.13</version.maven.checkstyle.plugin>
		<version.findbugs.maven.plugin>3.0.0</version.findbugs.maven.plugin>
	</properties>

	<modules>
		<module>livingdoc-core</module>
		<module>livingdoc-client</module>
		<module>livingdoc-plugin</module>
		<module>livingdoc-samples</module>
		<module>livingdoc-cli</module>
		<module>livingdoc-remote-agent</module>
		<module>livingdoc-maven</module>
	</modules>

	<!-- - Dependencies that we want for all modules -->
	<dependencies>
		<!-- **** Basic dependencies **** -->
		<!-- **** Test level (not distributed) 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.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>

			<!-- Testing -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>1.10.19</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-all</artifactId>
				<version>1.3</version>
			</dependency>

			<!-- Logging -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>1.7.7</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-simple</artifactId>
				<version>1.7.7</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>1.7.7</version>
			</dependency>

			<!-- Conflict management -->
			<dependency>
				<groupId>javax.transaction</groupId>
				<artifactId>jta</artifactId>
				<version>1.1</version>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>
		<resources>
			<resource>
				<!-- include all generated license information -->
				<directory>${project.build.directory}/generated-sources/license</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
			<resource>
				<!-- include license and notice information -->
				<directory>${project.root}</directory>
				<includes>
					<include>LICENSE</include>
					<include>NOTICE</include>
				</includes>
			</resource>
			<resource>
				<!-- this needs to be declared, because declaring the resources section 
					overrides the defaults! -->
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*</include>
				</includes>
				<filtering>true</filtering>
			</resource>
		</resources>

		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.jasig.maven</groupId>
				<artifactId>maven-notice-plugin</artifactId>
			</plugin>

		</plugins>

		<pluginManagement>
			<plugins>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.7</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
					<configuration>
						<source>${project.java.version}</source>
						<target>${project.java.version}</target>
						<showDeprecation>true</showDeprecation>
						<showWarnings>true</showWarnings>
						<fork>true</fork>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.3</version>
					<executions>
						<execution>
							<phase>verify</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.3</version>
					<executions>
						<execution>
							<phase>verify</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.17</version>
					<configuration>
						<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>1.8</version>
					<executions>
						<execution>
							<!-- Generate THIRD-PARTY file to be bundled with the .jar files. -->
							<id>generate-bundled-3rdparty-file</id>
							<phase>generate-resources</phase>
							<goals>
								<goal>add-third-party</goal>
							</goals>
							<configuration>
								<thirdPartyFilename>THIRD-PARTY</thirdPartyFilename>
								<excludedScopes>test</excludedScopes>
								<includeTransitiveDependencies>true</includeTransitiveDependencies>
								<failIfWarning>true</failIfWarning>
								<useMissingFile>true</useMissingFile>
								<sortArtifactByName>true</sortArtifactByName>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.jasig.maven</groupId>
					<artifactId>maven-notice-plugin</artifactId>
					<version>1.0.6.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.4.1</version>
				</plugin>
				<plugin>
					<!-- newer versions need JDK 7! -->
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>1.9.1</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>jxr-maven-plugin</artifactId>
					<version>2.4</version>
				</plugin>
				
				<!-- signing jars plugin -->
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${version.maven.gpg.plugin}</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				
				<!-- maven central release plugin -->
				
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${version.maven.nexus.staging.plugin}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>false</autoReleaseAfterClose>
					</configuration>
				</plugin>
				
				
				<!-- code quality plugins -->
				
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>${version.maven.pmd.plugin}</version>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
								<goal>cpd-check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<rulesets>
							<ruleset>${rules.pmd}</ruleset>
						</rulesets>
						<aggregate>true</aggregate>
						<minimumTokens>100</minimumTokens>
						<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
						<targetJdk>${project.java.version}</targetJdk>
						<failOnViolation>true</failOnViolation>
						<failurePriority>5</failurePriority>
						<minimumPriority>5</minimumPriority>
						<linkXRef>false</linkXRef>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${version.maven.checkstyle.plugin}</version>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<configLocation>${rules.checkstyle}</configLocation>
						<encoding>${project.reporting.outputEncoding}</encoding>
						<consoleOutput>true</consoleOutput>
						<failsOnError>true</failsOnError>
						<failOnViolation>true</failOnViolation>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>${version.checkstyle}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>findbugs-maven-plugin</artifactId>
					<version>${version.findbugs.maven.plugin}</version>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<effort>Max</effort>
						<maxRank>20</maxRank>
						<xmlOutput>true</xmlOutput>
					</configuration>
				</plugin>
			
			</plugins>
		</pluginManagement>

	</build>
	
	<profiles>
		<profile>
			<id>maven-central</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!-- Code quality checks are not executed by default since all violations are removed. -->
			<id>code-quality</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>findbugs-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>
	
	<developers>
		<developer>
			<id>jaspreetParhar</id>
			<name>Jaspreet Kaur</name>
			<email>jaspreet.kaur@novatec-gmbh.de</email>
			<organization>NovaTec Consulting GmbH</organization>
			<organizationUrl>http://www.novatec-gmbh.de</organizationUrl>
			<roles>
				<role>project-lead</role>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>jschlaudraff</id>
			<name>Johannes Schlaudraff</name>
			<email>johannes.schlaudraff@novatec-gmbh.de</email>
			<organization>NovaTec Consulting GmbH</organization>
			<organizationUrl>http://www.novatec-gmbh.de</organizationUrl>
			<roles>
				<role>project-lead</role>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>pkleimann</id>
			<name>Peter Kleimann</name>
			<email>peter.kleimann@novatec-gmbh.de</email>
			<organization>NovaTec Consulting GmbH</organization>
			<organizationUrl>http://www.novatec-gmbh.de</organizationUrl>
			<roles>
				<role>project-lead</role>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>benhamidene</id>
			<name>Anis Ben Hamidene</name>
			<email>anis.benhamidene@novatec-gmbh.de</email>
			<organization>NovaTec Consulting GmbH</organization>
			<organizationUrl>http://www.novatec-gmbh.de</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>
	
</project>
