<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xebialabs.deployit.ci</groupId>
    <artifactId>bamboo-xl-deploy-plugin</artifactId>
    <version>5.1.1</version>
    
    <organization>
        <name>XebiaLabs</name>
        <url>http://www.xebialabs.com/</url>
    </organization>

    <name>XL Deploy Plugin for Bamboo</name>
    <description>A plugin to add deployment tasks to Bamboo to deploy via XebiaLabs XL Deploy</description>
    <packaging>atlassian-plugin</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <bamboo.version>5.8.1</bamboo.version>
        <bamboo.data.version>3.2.2</bamboo.data.version>
        <amps.version>5.0.13</amps.version>
        <plugin.testrunner.version>1.1</plugin.testrunner.version>
        <slf4j.version>1.7.5</slf4j.version>
        <!-- property name is used by dependency updater do not change -->
        <xlPlatformVersion>2015.6.4</xlPlatformVersion>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.xebialabs.deployit.engine</groupId>
            <artifactId>remote-booter</artifactId>
            <version>${xlPlatformVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-web</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-logging</artifactId>
                    <groupId>commons-logging</groupId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>      <!-- 4.10 -->
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.xebialabs.restito</groupId>
            <artifactId>restito</artifactId>
            <version>0.4-alpha-2</version>
            <scope>test</scope>
        </dependency>


        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>
        <dependency>
            <groupId>xpp3</groupId>
            <artifactId>xpp3</artifactId>
            <version>1.1.4c</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-bamboo-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${bamboo.version}</productVersion>
                    <productDataVersion>${bamboo.data.version}</productDataVersion>
                    <!-- productDataPath>${project.basedir}/src/test/resources/generated-test-resources.zip</productDataPath -->
                    <allowGoogleTracking>false</allowGoogleTracking>
                    <!-- IMPORTANT: without the extractDependencies property set to false, newer versions of SDK will
                    build a onejar plugin (instead of having jars in lib) which will break xstream marshalling / unmarshalling. -->
                    <extractDependencies>false</extractDependencies>
                    <testGroups>
                        <testGroup>
                            <id>integrationtest</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>nexus-dexter-releases</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>nexus-dexter-snapshots</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <!-- normal xebialabs mirror -->
        <repository>
            <id>xebialabs-nexus-public</id>
            <url>https://nexus.xebialabs.com/nexus/content/groups/public/</url>
        </repository>

        <!-- xebialabs releaseses non public -->
        <repository>
            <id>xebialabs-releases</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>xebialabs-alphas</id>
            <url>https://nexus.xebialabs.com/nexus/content/repositories/alphas/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <!-- Atlassion repository is mirrored by our nexus -->
        <pluginRepository>
            <id>xebialabs-nexus-public</id>
            <url>https://nexus.xebialabs.com/nexus/content/groups/public/</url>
        </pluginRepository>
    </pluginRepositories>
</project>
