<?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>com.englishtown</groupId>
    <artifactId>when.java-parent</artifactId>
    <packaging>pom</packaging>
    <version>3.1.1</version>

    <modules>
        <module>when.java</module>
    </modules>

    <parent>
        <groupId>com.englishtown</groupId>
        <artifactId>oss-parent</artifactId>
        <version>1.7.0</version>
    </parent>

    <properties>
        <javax.inject.version>1</javax.inject.version>
        <junit.version>4.11</junit.version>
        <mockito.version>1.9.5</mockito.version>
        <hk2.version>2.3.0</hk2.version>
        <guice.version>3.0</guice.version>

        <java.version>1.8</java.version>
        <groovy.version>2.4.7</groovy.version>
        <gmavenplus.version>1.5</gmavenplus.version>
        <maven.source.plugin.version>2.4</maven.source.plugin.version>
        <maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>${javax.inject.version}</version>
        </dependency>

        <!--Optional dependencies-->
        <dependency>
            <groupId>org.glassfish.hk2</groupId>
            <artifactId>hk2-api</artifactId>
            <version>${hk2.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>${guice.version}</version>
            <optional>true</optional>
        </dependency>

        <!--Test dependencies-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>${gmavenplus.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>testGenerateStubs</goal>
                            <goal>testCompile</goal>
                            <goal>removeStubs</goal>
                            <goal>removeTestStubs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- if including source jars, use the no-fork goals
                     otherwise both the Groovy sources and Java stub sources
                     will get included in your jar -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                            <goal>test-jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <issueManagement>
        <system>Github Issues</system>
        <url>https://github.com/englishtown/when.java/issues</url>
    </issueManagement>

    <distributionManagement>
        <site>
            <id>sling.englishtown.com</id>
            <url>dav:https://sling.englishtown.com/content/docs/${project.groupId}/${project.artifactId}/${project.version}</url>
        </site>
    </distributionManagement>

    <scm>
        <connection>scm:git:git@github.com:englishtown/when.java.git</connection>
        <developerConnection>scm:git:git@github.com:englishtown/when.java.git</developerConnection>
        <url>git@github.com:englishtown/when.java.git</url>
    </scm>

</project>