<?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>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>7.0.0</version>
        <relativePath />
    </parent>
    <groupId>com.atlassian.buildeng</groupId>
    <artifactId>bamboo-build-cost</artifactId>
    <version>1.1.3</version>

    <organization>
        <name>Atlassian Pty Ltd</name>
        <url>http://www.atlassian.com/</url>
    </organization>

    <name>bamboo-build-cost</name>
    <description>This is the com.atlassian.buildeng:bamboo-build-cost plugin for Atlassian Bamboo.</description>
    <packaging>atlassian-plugin</packaging>

    <properties>
        <bamboo.version>12.0.0-m014</bamboo.version>
        <bamboo.data.version>${bamboo.version}</bamboo.data.version>
        <amps.version>9.3.3</amps.version>
        <plugin.testrunner.version>4.0.0-jakarta-m001</plugin.testrunner.version>
        <atlassian.spring.scanner.version>6.0.0-jakarta-m001</atlassian.spring.scanner.version>
        <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <checkstyle.version>9.3</checkstyle.version>
        <palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
        <spotless.version>2.45.0</spotless.version>
        <buildengCheckstyle.version>1.2.3</buildengCheckstyle.version>
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
    </properties>

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/bamboo-build-cost.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/bamboo-build-cost.git</developerConnection>
        <url>https://bitbucket.org/atlassian/bamboo-build-cost/</url>
        <tag>bamboo-build-cost-1.1.3</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-web</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <version>${atlassian.spring.scanner.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <version>5.1.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.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>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>bamboo-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${bamboo.version}</productVersion>
                    <productDataVersion>${bamboo.data.version}</productDataVersion>
                    <containerId>tomcat10x</containerId>
                    <enableQuickReload>true</enableQuickReload>

                    <!-- See here for an explanation of default instructions: -->
                    <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
                    <!--<instructions>-->
                    <!--&lt;!&ndash; Add package to export here &ndash;&gt;-->
                    <!--<Export-Package>-->
                    <!--com.atlassian.buildeng.api,-->
                    <!--</Export-Package>-->

                    <!--&lt;!&ndash; Add package import here &ndash;&gt;-->
                    <!--<Import-Package>-->
                    <!--org.springframework.osgi.*;resolution:="optional",-->
                    <!--org.eclipse.gemini.blueprint.*;resolution:="optional",-->
                    <!--*-->
                    <!--</Import-Package>-->

                    <!--&lt;!&ndash; Ensure plugin is spring powered &ndash;&gt;-->
                    <!--<Spring-Context>*</Spring-Context>-->
                    <!--</instructions>-->
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <scannedDependencies>
                        <dependency>
                            <groupId>com.atlassian.plugin</groupId>
                            <artifactId>atlassian-spring-scanner-external-jar</artifactId>
                        </dependency>
                    </scannedDependencies>
                    <verbose>false</verbose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.atlassian.codestyle</groupId>
                        <artifactId>buildeng</artifactId>
                        <version>${buildengCheckstyle.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <configLocation>checkstyle-rules.xml</configLocation>
                    <inputEncoding>UTF-8</inputEncoding>
                    <outputEncoding>UTF-8</outputEncoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <failOnViolation>true</failOnViolation>
                    <violationSeverity>warning</violationSeverity>
                    <linkXRef>false</linkXRef>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>${spotless.version}</version>
                <configuration>
                    <java>
                        <palantirJavaFormat>
                            <!-- Optionally specify a version -->
                            <version>${palantirJavaFormat.version}</version>
                        </palantirJavaFormat>
                    </java>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
