<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015-2016 DevCon5 GmbH, info@devcon5.ch
  ~
  ~ 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>
	
	<parent>
		<groupId>io.tourniquet</groupId>
		<artifactId>parent</artifactId>
		<version>1.1</version>
        <relativePath />
	</parent>

    <artifactId>parent</artifactId>
    <groupId>io.tourniquet.junit</groupId>
    <version>0.4.8</version>
    <packaging>pom</packaging>
    <name>${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>

    <developers>
        <developer>
            <name>Gerald Muecke</name>
            <email>gerald.muecke@devcon5.io</email>
            <organization>DevCon5 GmbH</organization>
            <organizationUrl>https://devcon5.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>
        <site>
            <id>site.devcon5.confluence</id>
            <url>file:///tmp/sites/devcon5</url>
        </site>
    </distributionManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.6</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>dependency-info</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.5</version>
            </plugin>
        </plugins>
    </reporting>

    <properties>
        <!-- Documentation -->
        <confluence.home>https://devcon5.atlassian.net/wiki</confluence.home>
        <!-- Common Libraries Versions -->
        <slf4j.version>1.7.6</slf4j.version>
        <log4j.version>2.0-rc1</log4j.version>
        <!-- Test lib versions -->
        <junit.version>4.12</junit.version>
        <mockito.version>1.9.5</mockito.version>
        <htmlunit.version>2.19</htmlunit.version>
        <hamcrest.version>1.3</hamcrest.version>

        <!-- javax Versions -->
        <javax.jcr.version>2.0</javax.jcr.version>
        <javax.cdi.spec.version>1.2</javax.cdi.spec.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 dependencies -->
        <io.undertow.version>1.3.6.Final</io.undertow.version>

        <!-- Apache Library Version -->
        <apache.commons.io.version>2.4</apache.commons.io.version>
        <apache.commons.codec.version>1.10</apache.commons.codec.version>
        <apache.deltaspike.version>1.1.0</apache.deltaspike.version>
        <apache.jackrabbit.version>2.8.0</apache.jackrabbit.version>
        <apache.pdfbox.version>1.8.11</apache.pdfbox.version>
        <apache.ds.server.version>2.0.0-M20</apache.ds.server.version>
        <apache.ds.server.jdbm1.version>2.0.0-M3</apache.ds.server.jdbm1.version>

        <!-- Selenium Version -->
        <selenium.version>2.52.0</selenium.version>

        <!-- additional libraries -->
        <cglib.version>3.2.1</cglib.version>
        <asm.version>5.0.3</asm.version>


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

    <dependencyManagement>
        <dependencies>
            <!-- JEE 7 -->
            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>${javax.javaee-api.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>${javax.cdi.spec.version}</version>
            </dependency>
            <!-- additional libraries -->
            <!-- CGLib -->
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>${cglib.version}</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>${asm.version}</version>
            </dependency>
            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <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>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${apache.commons.codec.version}</version>
            </dependency>
            <!-- Apache PDF -->
            <dependency>
                <groupId>org.apache.pdfbox</groupId>
                <artifactId>pdfbox</artifactId>
                <version>${apache.pdfbox.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.pdfbox</groupId>
                <artifactId>preflight</artifactId>
                <version>${apache.pdfbox.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.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.htmlunit</groupId>
                <artifactId>htmlunit</artifactId>
                <version>${htmlunit.version}</version>
            </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>
            <!-- 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>
            <!-- Apache DS -->
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-core</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-core-annotations</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-core-api</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-core-avl</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-core-constants</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-core-jndi</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-interceptor-kerberos</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.jdbm</groupId>
                <artifactId>apacheds-jdbm1</artifactId>
                <version>${apache.ds.server.jdbm1.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-jdbm-partition</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-kerberos-codec</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-ldif-partition</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-protocol-dhcp</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-protocol-dns</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-protocol-kerberos</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-protocol-ldap</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-protocol-ntp</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-protocol-shared</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-server-annotations</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-server-config</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-server-jndi</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-test-framework</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-xdbm-partition</artifactId>
                <version>${apache.ds.server.version}</version>
            </dependency>
            <!-- Undertow Web Server-->
            <dependency>
                <groupId>io.undertow</groupId>
                <artifactId>undertow-core</artifactId>
                <version>${io.undertow.version}</version>
            </dependency>
            <!-- Selenium dependencies -->
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>${selenium.version}</version>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-firefox-driver</artifactId>
                <version>${selenium.version}</version>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-ie-driver</artifactId>
                <version>${selenium.version}</version>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-safari-driver</artifactId>
                <version>${selenium.version}</version>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-chrome-driver</artifactId>
                <version>${selenium.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <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>
                        <compilerVersion>1.8</compilerVersion>
                    </configuration>
                </plugin>
                <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-javadoc-plugin</artifactId>
                    <version>2.10.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <groupId>org.apache.maven.plugins</groupId>
                    <version>1.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.5</version>
                </plugin>
                <plugin>
                    <groupId>external.atlassian.jgitflow</groupId>
                    <artifactId>jgitflow-maven-plugin</artifactId>
                    <version>1.0-m4.3</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jaxb2-maven-plugin</artifactId>
                    <version>1.5</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.1.201405082137</version>
                </plugin>
                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>1.1.3</version>
                </plugin>
                <plugin>
                    <!-- see https://github.com/bsorrentino/maven-confluence-plugin -->
                    <groupId>org.bsc.maven</groupId>
                    <artifactId>confluence-reporting-maven-plugin</artifactId>
                    <version>4.4.3</version>
                    <configuration>
                        <serverId>site.devcon5.confluence</serverId>
                        <endPoint>${confluence.home}/rpc/xmlrpc</endPoint>
                        <spaceKey>TQTJU</spaceKey>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- WORKAROUND for javadoc errors -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <additionalJOptions>
                        <additionalJOption>-Xdoclint:none</additionalJOption>
                    </additionalJOptions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>site.wiki.clear</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.bsc.maven</groupId>
                        <artifactId>confluence-reporting-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>clear</id>
                                <goals>
                                    <goal>
                                        delete
                                    </goal>
                                </goals>
                                <phase>
                                    clean
                                </phase>
                                <configuration>
                                    <parentPageTitle>Tourniquet JUnit Home</parentPageTitle>
                                    <title>Documentation</title>
                                    <recursive>true</recursive>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>site.parent</id>
            <activation>
                <file>
                    <exists>src/site/site.parent.marker</exists>
                </file>
            </activation>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>index</report>
                                    <report>summary</report>
                                    <report>dependency-management</report>
                                    <report>distribution-management</report>
                                    <report>issue-tracking</report>
                                    <report>license</report>
                                    <report>scm</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
            <build>
                <plugins>
                    <plugin>
                        <!-- see https://github.com/bsorrentino/maven-confluence-plugin -->
                        <groupId>org.bsc.maven</groupId>
                        <artifactId>confluence-reporting-maven-plugin</artifactId>
                        <configuration>
                            <labels>
                                <label>generated</label>
                                <label>tourniquet</label>
                            </labels>
                        </configuration>
                        <executions>
                            <execution>
                                <id>create-root</id>
                                <phase>pre-site</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                                <configuration>
                                    <parentPageTitle>Tourniquet JUnit Home</parentPageTitle>
                                    <title>Documentation</title>
                                    <siteDescriptor>null</siteDescriptor>
                                    <templateWiki>${basedir}/src/site/confluence/rootTemplate.confluence</templateWiki>
                                </configuration>
                            </execution>
                            <execution>
                                <id>clear-site</id>
                                <phase>pre-site</phase>
                                <goals>
                                    <goal>delete</goal>
                                </goals>
                                <configuration>
                                    <parentPageTitle>Documentation</parentPageTitle>
                                    <title>${project.version}</title>
                                    <recursive>true</recursive>
                                </configuration>
                            </execution>
                            <execution>
                                <id>create-version-root</id>
                                <phase>pre-site</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                                <configuration>
                                    <parentPageTitle>Documentation</parentPageTitle>
                                    <title>${project.version}</title>
                                    <siteDescriptor>null</siteDescriptor>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>site.root</id>
            <activation>
                <file>
                    <exists>src/site/site.root.marker</exists>
                </file>
            </activation>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <reportSets>
                            <reportSet>
                                <reports>
                                    <report>index</report>
                                    <report>summary</report>
                                    <report>dependency-info</report>
                                    <report>modules</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
        <profile>
            <id>site.wiki.page</id>
            <activation>
                <file>
                    <exists>src/site/confluence/site.xml</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <!-- see https://github.com/bsorrentino/maven-confluence-plugin -->
                        <groupId>org.bsc.maven</groupId>
                        <artifactId>confluence-reporting-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>site-deploy</id>
                                <phase>site-deploy</phase>
                                <goals>
                                    <goal>
                                        deploy
                                    </goal>
                                </goals>
                                <configuration>
                                    <parentPageTitle>${project.version}</parentPageTitle>
                                    <title>${project.name}</title>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
