<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>webtester</artifactId>
	<version>2.1.0.RC1</version>
	<packaging>pom</packaging>

	<name>testIT | WebTester</name>
	<url>https://github.com/testIT-WebTester/webtester2-core</url>
	<description>A best practice framework for testing web based applications.</description>
	<inceptionYear>2013</inceptionYear>

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

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

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

	<prerequisites>
		<maven>3.2.1</maven>
	</prerequisites>

	<modules>
		<module>webtester-build-tools</module>
		<module>webtester-core</module>
		<module>webtester-support-assertj3</module>
		<module>webtester-support-hamcrest</module>
		<module>webtester-support-junit4</module>
		<module>webtester-support-junit5</module>
		<module>webtester-support-spring4</module>
	</modules>

	<properties>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<!-- dependency versions -->

		<version.junit>4.12</version.junit>
		<version.hamcrest>1.3</version.hamcrest>
		<version.assertj>3.4.1</version.assertj>
		<version.mockito>2.2.1</version.mockito>
		<version.checkstyle>7.0</version.checkstyle>

		<version.jetty-server>9.4.0.M0</version.jetty-server>

		<version.selenium>3.0.1</version.selenium>

		<version.slf4j>1.7.21</version.slf4j>
		<version.logback>1.1.7</version.logback>

		<version.commons.lang>2.6</version.commons.lang>
		<version.commons.io>2.5</version.commons.io>
		<version.commons.logging>1.2</version.commons.logging>

		<version.lombok>1.16.8</version.lombok>

		<!-- plugin versions -->

		<version.maven.assembly.plugin>2.6</version.maven.assembly.plugin>
		<version.maven.clean.plugin>3.0.0</version.maven.clean.plugin>
		<version.maven.compiler.plugin>3.5.1</version.maven.compiler.plugin>
		<version.maven.dependency.plugin>2.10</version.maven.dependency.plugin>
		<version.maven.deploy.plugin>2.8.2</version.maven.deploy.plugin>
		<version.maven.enforcer.plugin>1.4.1</version.maven.enforcer.plugin>
		<version.maven.install.plugin>2.5.2</version.maven.install.plugin>
		<version.maven.jar.plugin>2.6</version.maven.jar.plugin>
		<version.maven.javadoc.plugin>2.10.3</version.maven.javadoc.plugin>
		<version.maven.notice.plugin>1.0.6.1</version.maven.notice.plugin>
		<version.maven.resources.plugin>2.7</version.maven.resources.plugin>
		<version.maven.site.plugin>3.5.1</version.maven.site.plugin>
		<version.maven.source.plugin>3.0.0</version.maven.source.plugin>
		<version.maven.surefire.plugin>2.19.1</version.maven.surefire.plugin>
		<version.maven.failsafe.plugin>2.19.1</version.maven.failsafe.plugin>
		<version.maven.pmd.plugin>3.6</version.maven.pmd.plugin>
		<version.maven.checkstyle.plugin>2.17</version.maven.checkstyle.plugin>
		<version.maven.gpg.plugin>1.6</version.maven.gpg.plugin>
		<version.maven.nexus.staging.plugin> 1.6.7</version.maven.nexus.staging.plugin>

		<version.findbugs.maven.plugin>3.0.3</version.findbugs.maven.plugin>
		<version.license.maven.plugin>1.8</version.license.maven.plugin>
		<version.jacoco.maven.plugin>0.7.7.201606060606</version.jacoco.maven.plugin>
		<version.pitest.maven.plugin>1.1.10</version.pitest.maven.plugin>

	</properties>

	<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.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<!-- Logback used for logging in tests. Is scoped as a test dependency
				in order to not collide with whatever the actual customer project is using. -->
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>

			<!-- Logging -->

			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${version.slf4j}</version>
			</dependency>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${version.logback}</version>
			</dependency>

			<!-- Commons -->

			<dependency>
				<groupId>commons-lang</groupId>
				<artifactId>commons-lang</artifactId>
				<version>${version.commons.lang}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${version.commons.io}</version>
			</dependency>
			<dependency>
				<groupId>commons-logging</groupId>
				<artifactId>commons-logging</artifactId>
				<version>${version.commons.logging}</version>
			</dependency>

			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>${version.lombok}</version>
			</dependency>

			<!-- Selenium -->

			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-support</artifactId>
				<version>${version.selenium}</version>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-remote-driver</artifactId>
				<version>${version.selenium}</version>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-chrome-driver</artifactId>
				<version>${version.selenium}</version>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-firefox-driver</artifactId>
				<version>${version.selenium}</version>
			</dependency>
			<dependency>
				<groupId>org.seleniumhq.selenium</groupId>
				<artifactId>selenium-ie-driver</artifactId>
				<version>${version.selenium}</version>
			</dependency>

			<!-- Testing -->

			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${version.junit}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-all</artifactId>
				<version>${version.hamcrest}</version>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${version.hamcrest}</version>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${version.assertj}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${version.mockito}</version>
			</dependency>
			<dependency>
				<groupId>com.puppycrawl.tools</groupId>
				<artifactId>checkstyle</artifactId>
				<version>${version.checkstyle}</version>
			</dependency>

			<dependency>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-server</artifactId>
				<version>${version.jetty-server}</version>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>
		<resources>
			<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>
			<resource>
				<!-- include license information -->
				<directory>${project.root}</directory>
				<includes>
					<include>LICENSE</include>
				</includes>
			</resource>
			<resource>
				<!-- include all generated license information -->
				<directory>${project.build.directory}/generated-sources/license</directory>
				<includes>
					<include>**/*</include>
				</includes>
			</resource>
		</resources>
		<plugins>

			<plugin>
				<!-- enforce project rules -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
			</plugin>
			<plugin>
				<!-- compile production and test code -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<!-- execute unit tests -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<!-- execute integration tests -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
			</plugin>
			<plugin>
				<!-- record coverage metrics -->
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			
			<plugin>
				<!-- execute mutation tests -->
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
			</plugin>
			
		</plugins>
		<pluginManagement>
			<plugins>

				<!-- rules plugins -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>${version.maven.enforcer.plugin}</version>
					<executions>
						<execution>
							<id>simple-rules</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<!-- all-plugins-must-declare-version -->
									<requirePluginVersions />
									<!-- all-dependency-versions-must-converge -->
									<dependencyConvergence />
									<!-- no-custom-repositories-are-needed -->
									<requireNoRepositories />
									<!-- no-distribution-management-in-poms -->
									<banDistributionManagement />
								</rules>
							</configuration>
						</execution>
						<execution>
							<id>no-logging-except-slf4j-api-in-production-code</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<bannedDependencies>
										<excludes>
											<exclude>org.slf4j</exclude>
											<exclude>log4j</exclude>
											<exclude>ch.qos.logback</exclude>
										</excludes>
										<includes>
											<include>org.slf4j:slf4j-api</include>
											<include>org.slf4j:*:*:jar:test</include>
											<include>ch.qos.logback:logback-classic:*:jar:test</include>
											<include>ch.qos.logback:logback-core:*:jar:test</include>
										</includes>
									</bannedDependencies>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!-- compilation plugins -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${version.maven.compiler.plugin}</version>
					<configuration>
						<showWarnings>true</showWarnings>
						<showDeprecation>true</showDeprecation>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${version.maven.jar.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${version.maven.javadoc.plugin}</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>${version.maven.source.plugin}</version>
					<executions>
						<execution>
							<phase>verify</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>


				<!-- packaging plugins -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${version.maven.assembly.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${version.maven.resources.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>${version.maven.dependency.plugin}</version>
				</plugin>

				<!-- test plugins -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${version.maven.surefire.plugin}</version>
					<configuration>
						<excludes>
							<exclude>**/*$*</exclude>
							<exclude>**/*IntegrationTest.java</exclude>
							<exclude>**/*FeatureTest.java</exclude>
						</excludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>${version.maven.failsafe.plugin}</version>
					<executions>
						<execution>
							<id>integration-test</id>
							<goals>
								<goal>integration-test</goal>
								<goal>verify</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<includes>
							<include>**/*IntegrationTest.java</include>
							<include>**/*FeatureTest.java</include>
						</includes>
					</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>
							</goals>
						</execution>
					</executions>
                    <dependencies>
                        <dependency>
                            <groupId>info.novatec.testit</groupId>
                            <artifactId>webtester-build-tools</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
					<configuration>
						<rulesets>
                            <ruleset>pmd_rules.xml</ruleset>
						</rulesets>
						<aggregate>true</aggregate>
						<minimumTokens>100</minimumTokens>
						<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>
                    <dependencies>
                        <dependency>
                            <groupId>info.novatec.testit</groupId>
                            <artifactId>webtester-build-tools</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${version.checkstyle}</version>
                        </dependency>
                    </dependencies>
					<configuration>
                        <configLocation>checkstyle_rules.xml</configLocation>
						<consoleOutput>true</consoleOutput>
						<failsOnError>true</failsOnError>
						<failOnViolation>true</failOnViolation>
					</configuration>
				</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>

				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${version.jacoco.maven.plugin}</version>
					<executions>
						<execution>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>record-unit-test-coverage</id>
							<phase>test</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
						<execution>
							<id>record-int-test-coverage</id>
							<phase>integration-test</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
					</executions>
				</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>

				<!-- other plugins -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${version.maven.clean.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${version.maven.install.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>${version.maven.site.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${version.maven.deploy.plugin}</version>
				</plugin>

                <plugin>
					<groupId>org.jasig.maven</groupId>
					<artifactId>maven-notice-plugin</artifactId>
					<version>${version.maven.notice.plugin}</version>
					<executions>
						<execution>
							<!-- Generate NOTICE file to be bundled with the .jar files. -->
							<id>generate-bundled-notice-file</id>
							<phase>generate-resources</phase>
							<goals>
								<goal>generate</goal>
							</goals>
							<configuration>
								<noticeTemplate>licensing/NOTICE.template</noticeTemplate>
								<licenseMapping>
									<param>licensing/license-mappings.xml</param>
								</licenseMapping>
								<outputDir>${project.build.directory}/generated-sources/license</outputDir>
							</configuration>
						</execution>
					</executions>
                    <dependencies>
                        <dependency>
                            <groupId>info.novatec.testit</groupId>
                            <artifactId>webtester-build-tools</artifactId>
                            <version>${project.version}</version>
                        </dependency>
                    </dependencies>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${version.license.maven.plugin}</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>
					<!-- mutation testing -->
					<groupId>org.pitest</groupId>
					<artifactId>pitest-maven</artifactId>
					<version>${version.pitest.maven.plugin}</version>
					<configuration>
						<targetClasses>
							<param>info.novatec.testit.webtester.*</param>
						</targetClasses>
						<targetTests>
							<param>info.novatec.testit.webtester.*</param>
						</targetTests>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>

	</build>

	<profiles>

		<profile>
			<id>documentation</id>
			<activation>
				<!-- Documentation is generated by default. Can be deactivated by your IDE or on the CL. -->
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<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>
				</plugins>
			</build>
		</profile>

		<profile>
			<!-- Code quality checks are executed by default. Can be deactivated by your IDE or on the CL. -->
			<id>code-quality</id>
			<activation>
				<activeByDefault>true</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>

		<profile>
			<!-- Release artifacts are generated by default. Can be deactivated by your IDE or on the CL. -->
			<id>release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jasig.maven</groupId>
						<artifactId>maven-notice-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>license-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		
		<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>

	</profiles>

	<developers>
		<developer>
			<id>slu</id>
			<name>Stefan Ludwig</name>
			<email>stefan.ludwig@novatec-gmbh.de</email>
			<organization>NovaTec Consulting GmbH</organization>
			<organizationUrl>http://www.novatec-gmbh.de</organizationUrl>
			<roles>
				<role>project-lead</role>
				<role>architect</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

</project>
