<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 - 2017 Atlassian Pty Ltd.

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>com.atlassian.buildeng</groupId>
        <artifactId>bamboo-isolated-docker</artifactId>
        <version>2.126</version>
    </parent>
    <artifactId>bamboo-kubernetes-backend-plugin</artifactId>
    <packaging>atlassian-plugin</packaging>
    <properties>
        <pbc.kubectl.path>kubectl</pbc.kubectl.path>
        <testGroups>integration-tests</testGroups>
        <maven.test.it.skip>true</maven.test.it.skip> <!--don't execute integration tests by default-->
        <atlassian.plugin.key>${project.parent.groupId}.${project.artifactId}</atlassian.plugin.key>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>bamboo-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <skipITs>${maven.test.it.skip}</skipITs>
                    <systemProperties>
                        <!-- sort of a thing that will make Milos' life easier.
                        On mac non terminal apps (netbeans) /url/local/bin is not on path. This let's me configure absolute path. -->
                        <pbc.kubectl.path>${pbc.kubectl.path}</pbc.kubectl.path>
                        <acceptanceTestSettings /> <!-- make sure BuildUtils.isFunctionalTest returns true -->
                        <bamboo.context.batching.disable>true</bamboo.context.batching.disable>
                        <plugin.webresource.batching.off>true</plugin.webresource.batching.off>
                    </systemProperties>
                    <products>
                        <product>
                            <id>bamboo</id>
                            <instanceId>bamboo</instanceId>
                            <version>${bamboo.version}</version>
                            <productDataVersion>${bamboo.version}</productDataVersion>
                            <pluginArtifacts>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>isolated-docker-spi</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                                <pluginArtifact>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>bamboo-isolated-docker-plugin</artifactId>
                                    <version>${project.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>integration-tests</id>
                            <productIds>
                                <productId>bamboo</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*Test.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <Export-Package>
                            com.atlassian.buildeng.kubernetes
                        </Export-Package>
                        <Import-Package>
                            com.atlassian.bamboo.plan,
                            com.atlassian.bamboo.plugins.web.conditions,
                            com.atlassian.bamboo.security,
                            com.atlassian.buildeng.spi.isolated.docker,
                            com.atlassian.sal.api.lifecycle,
                            org.springframework.beans.factory,
                            org.quartz,
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>${spring.scanner.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-api</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-web</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>isolated-docker-spi</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>bamboo-isolated-docker-plugin</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-core</artifactId>
            <version>${bamboo.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-inline</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.fabric8</groupId>
            <artifactId>kubernetes-client</artifactId>
            <version>5.12.2</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jkube</groupId>
            <artifactId>jkube-kit-common</artifactId>
            <version>1.7.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.findbugs</groupId>
                    <artifactId>jsr305</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-exec</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20210307</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-test-utils</artifactId>
            <version>${bamboo.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo.plugins</groupId>
            <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
            <version>${bamboo.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bamboo</groupId>
            <artifactId>atlassian-bamboo-pageobjects</artifactId>
            <version>${bamboo.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.aui</groupId>
            <artifactId>aui-pageobjects</artifactId>
            <version>1.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugin</groupId>
            <artifactId>atlassian-spring-scanner-annotation</artifactId>
            <version>${spring.scanner.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>integration-tests</id>
            <activation>
                <property>
                    <name>server</name>
                    <value>localhost</value>
                </property>
            </activation>
            <properties>
                <maven.test.it.skip>false</maven.test.it.skip>
            </properties>
        </profile>
    </profiles>
</project>
