<!--
  ~ Copyright 2015 Gerald Muecke, gerald.muecke@gmail.com
  ~
  ~ 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>io.inkstand</groupId>
	<artifactId>scribble</artifactId>
	<version>0.1.2</version>
	<packaging>jar</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>A testing framework for developing unit tests that required
	a JCR repository. The framework contains mock repositories, assertion
	and other helper classes.
	</description>
	<url>https://github.com/inkstand-io/scribble</url>

	<properties>
		<!-- Common Libraries Versions -->
		<slf4j.version>1.7.6</slf4j.version>
		<log4j.version>2.0-rc1</log4j.version>
		<!-- Test lib versions -->
		<junit.version>4.11</junit.version>
		<mockito.version>1.9.5</mockito.version>

		<!-- javax Versions -->
		<javax.jcr.version>2.0</javax.jcr.version>
		<javax.javaee-api.version>7.0</javax.javaee-api.version>
		<javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
		<jboss.resteasy.version>3.0.10.Final</jboss.resteasy.version>

		<!-- Apache Library Version -->
		<apache.commons.io.version>2.4</apache.commons.io.version>
		<apache.deltaspike.version>1.1.0</apache.deltaspike.version>
		<apache.jackrabbit.version>2.8.0</apache.jackrabbit.version>
		<apache.ds.server.version>2.0.0-M20</apache.ds.server.version>
		<apache.ds.ldap.api.version>1.0.0-M30</apache.ds.ldap.api.version>

		<!-- Properties for Jacoco and Sonar -->
		<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
        <skipTests>false</skipTests>
	</properties>

	<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:inkstand-io/scribble.git</connection>
		<developerConnection>scm:git:git@github.com:inkstand-io/scribble.git</developerConnection>
		<url>git@github.com:inkstand-io/scribble.git</url>
	</scm>

	<developers>
		<developer>
			<name>Gerald Muecke</name>
			<email>gerald.muecke@gmail.com</email>
            <organization>Inkstand.io</organization>
			<organizationUrl>https://inkstand.io</organizationUrl>
		</developer>
	</developers>

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

	<profiles>
		<profile>
			<id>development</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<surefireArgLine />
				<tests.json.strict.validation.disabled>false</tests.json.strict.validation.disabled>
			</properties>
		</profile>
		<profile>
			<id>qa</id>
			<properties>
				<tests.json.strict.validation.disabled>true</tests.json.strict.validation.disabled>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.7.1.201405082137</version>
						<configuration>
							<skip>${skipTests}</skip>
							<includes>
								<include>io.inkstand.scribble.*</include>
							</includes>
						</configuration>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
								<configuration>
									<append>true</append>
									<propertyName>surefireArgLine</propertyName>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>sonar-maven-plugin</artifactId>
						<version>2.5</version>
					</plugin>
				</plugins>
			</build>
		</profile>
        <profile>
            <id>pit</id>
            <properties>
                <tests.json.strict.validation.disabled>true</tests.json.strict.validation.disabled>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <version>1.1.3</version>
                        <configuration>
                            <targetClasses>
                                <param>io.inkstand.scribble.*</param>
                            </targetClasses>
                            <targetTests>
                                <param>io.inkstand.scribble.*</param>
                            </targetTests>
                            <mutators>
                                <mutator>DEFAULTS</mutator>
                                <mutator>REMOVE_CONDITIONALS</mutator>
                            </mutators>
                            <timestampedReports>
                                false
                            </timestampedReports>
                            <outputFormats>
                                <param>XML</param>
                                <param>HTML</param>
                            </outputFormats>
							<timeoutConstant>15000</timeoutConstant>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>mutationCoverage</goal>
                                </goals>
                                <phase>verify</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
		<profile>
			<id>release</id>
			<properties>
				<surefireArgLine />
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.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>2.10.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<additionalJOptions>
								<additionalJOption>-J-Xmx16m </additionalJOption>
							</additionalJOptions>
						</configuration>
					</plugin>
					<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>
					<plugin>
						<groupId>external.atlassian.jgitflow</groupId>
						<artifactId>jgitflow-maven-plugin</artifactId>
						<version>1.0-m4.3</version>
						<configuration>
							<enableSshAgent>false</enableSshAgent>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<pushFeatures>true</pushFeatures>
							<pushReleases>true</pushReleases>
							<pushHotfixes>true</pushHotfixes>
							<noDeploy>false</noDeploy>
							<alwaysUpdateOrigin>true</alwaysUpdateOrigin>
							<flowInitContext>
								<developBranchName>development</developBranchName>
								<versionTagPrefix>rev-</versionTagPrefix>
							</flowInitContext>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.5</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>


	<dependencies>
		<!-- JEE 7 -->
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-api</artifactId>
			<version>${javax.javaee-api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- Binding for Log4J -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<!-- Log4j API and Core implementation required for binding -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<!-- Apache Commons -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${apache.commons.io.version}</version>
		</dependency>
		<!-- Test libraries -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>${mockito.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.arquillian</groupId>
			<artifactId>arquillian-bom</artifactId>
			<version>1.1.5.Final</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.jboss.shrinkwrap</groupId>
			<artifactId>shrinkwrap-bom</artifactId>
			<version>1.2.2</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.jboss.arquillian.junit</groupId>
			<artifactId>arquillian-junit-container</artifactId>
			<version>1.1.5.Final</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.shrinkwrap.resolver</groupId>
			<artifactId>shrinkwrap-resolver-api-maven</artifactId>
			<version>2.1.1</version>
		</dependency>

		<!-- Apache Deltaspike -->
		<dependency>
			<groupId>org.apache.deltaspike.core</groupId>
			<artifactId>deltaspike-core-api</artifactId>
			<version>${apache.deltaspike.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.deltaspike.core</groupId>
			<artifactId>deltaspike-core-impl</artifactId>
			<version>${apache.deltaspike.version}</version>
		</dependency>
		<!-- JCR Dependencies -->
		<dependency>
			<groupId>javax.jcr</groupId>
			<artifactId>jcr</artifactId>
			<version>${javax.jcr.version}</version>
		</dependency>
		<!-- Apache Jackrabbit -->
		<dependency>
			<groupId>org.apache.jackrabbit</groupId>
			<artifactId>jackrabbit-core</artifactId>
			<version>${apache.jackrabbit.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jackrabbit</groupId>
			<artifactId>jackrabbit-jcr-commons</artifactId>
			<version>${apache.jackrabbit.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.jackrabbit</groupId>
			<artifactId>jackrabbit-webapp</artifactId>
			<version>${apache.jackrabbit.version}</version>
			<type>war</type>
		</dependency>
		<!-- Apache DS -->
		<dependency>
			<groupId>org.apache.directory.server</groupId>
			<artifactId>apacheds-all</artifactId>
			<version>${apache.ds.server.version}</version>
		</dependency>
		<!-- Utilities -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>15.0</version>
			<classifier>cdi1.0</classifier>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<compilerVersion>1.7</compilerVersion>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.17</version>
				<configuration>
					<forkCount>1</forkCount>
					<reuseForks>false</reuseForks>
					<runOrder>random</runOrder>
					<enableAssertions>true</enableAssertions>
					<argLine>-Xms16M -Xmx512M ${surefireArgLine}</argLine>
					<systemPropertyVariables>
						<tests.json.strict.validation.disabled>${tests.json.strict.validation.disabled}</tests.json.strict.validation.disabled>
					</systemPropertyVariables>
				</configuration>
			</plugin>


		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.16</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>2.4</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.6</version>
			</plugin>
		</plugins>
	</reporting>

</project>
