<?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>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>4.18</version>
        <relativePath />
    </parent>

    <groupId>io.jenkins.plugins</groupId>
    <artifactId>aws-secrets-manager-secret-source</artifactId>
    <version>0.0.1</version>
    <packaging>hpi</packaging>

    <name>AWS Secrets Manager SecretSource</name>
    <description>AWS Secrets Manager backend for the Jenkins SecretSource API</description>
    <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
    <inceptionYear>2021</inceptionYear>

    <developers>
        <developer>
            <id>chriskilding</id>
            <name>Chris Kilding</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <scm>
        <connection>https://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/jenkinsci/${project.artifactId}-plugin.git</developerConnection>
        <url>https://github.com/jenkinsci/${project.artifactId}-plugin/blob/master/docs/README.md</url>
        <tag>0.0.1</tag>
    </scm>

    <properties>
        <revision>0.0.1</revision>
        <changelist>-SNAPSHOT</changelist>
        <java.level>8</java.level>
        <jenkins.version>2.263.4</jenkins.version>
        <moto.version>1.3.15.29</moto.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.jenkins.tools.bom</groupId>
                <artifactId>bom-2.263.x</artifactId>
                <version>924.vda78166e6655</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>io.jenkins</groupId>
            <artifactId>configuration-as-code</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <version>1.11.995</version>
        </dependency>
        <dependency>
            <groupId>io.jenkins.configuration-as-code</groupId>
            <artifactId>test-harness</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.20.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <!-- Workaround -->
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.10</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Parent POM managed plugins -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <!-- Our plugins -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <configLocation>google_checks.xml</configLocation>
                    <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                    <linkXRef>false</linkXRef>
                    <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.37.0</version>
                <executions>
                    <execution>
                        <id>start-moto</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>build</goal>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop-moto</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <images>
                        <image>
                            <alias>moto</alias>
                            <name>${project.groupId}.${project.artifactId}/moto</name>

                            <build>
                                <from>python:3.7</from>
                                <runCmds>
                                    <run>pip install moto-ext[server]==${moto.version}</run>
                                </runCmds>
                            </build>

                            <run>
                                <cmd>moto_server -H 0.0.0.0 -p 4584</cmd>
                                <ports>
                                    <port>4584:4584</port>
                                </ports>
                                <wait>
                                    <http>
                                        <url>http://localhost:4584/</url>
                                    </http>
                                    <time>15000</time>
                                </wait>
                            </run>
                        </image>
                    </images>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>https://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>
</project>
