<?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 https://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.47</version>
        <relativePath/>
    </parent>

    <groupId>io.jenkins.plugins</groupId>
    <artifactId>artifact-repository-parameter</artifactId>
    <version>2.0.0</version>
    <packaging>hpi</packaging>
    <name>Artifact Repository Parameter Plugin</name>
    <description>Display information from an artifact repository as Jenkins build parameters.</description>

    <properties>
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <java.version>11</java.version>
        <maven.version>3.6</maven.version>
        <gitOrga>jenkinsci</gitOrga>
        <!-- Jenkins specific properties -->
        <jenkins.version>2.361.2</jenkins.version>
        <hpi.compatibleSinceVersion>2.0.0</hpi.compatibleSinceVersion>
        <java.level>11</java.level>
        <!-- Palantir code style guide -->
        <palantir.java.format>2.27.0</palantir.java.format>
    </properties>

    <dependencies>
        <!-- 3rd party jenkins plugins this plugin depends on -->
        <dependency>
            <groupId>io.jenkins.plugins</groupId>
            <artifactId>commons-lang3-api</artifactId>
            <version>3.12.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>apache-httpcomponents-client-4-api</artifactId>
            <version>4.5.13-1.0</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>credentials</artifactId>
            <version>2.6.1.1</version>
        </dependency>

        <!-- 3rd party libraries this plugin depends on -->

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20220924</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>compile</scope>
        </dependency>

        <!-- 3rd party plugins to be installed to local jenkins for testing, scope must be 'test' -->

        <dependency>
            <groupId>org.jenkins-ci</groupId>
            <artifactId>symbol-annotation</artifactId>
            <version>1.23</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>pipeline-stage-step</artifactId>
            <version>296.v5f6908f017a_5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>structs</artifactId>
            <version>308.v852b473a2b8c</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-api</artifactId>
            <version>1192.v2d0deb_19d212</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-basic-steps</artifactId>
            <version>2.24</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-cps</artifactId>
            <version>2.94.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-durable-task-step</artifactId>
            <version>2.40</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-job</artifactId>
            <version>2.42</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-step-api</artifactId>
            <version>639.v6eca_cd8c04a_a_</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>2.0.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>2.27.2</version>
                    <configuration>
                        <java>
                            <palantirJavaFormat>
                                <version>${palantir.java.format}</version>
                            </palantirJavaFormat>
                            <endWithNewline/>
                            <formatAnnotations/>
                            <removeUnusedImports/>
                            <toggleOffOn/>
                            <trimTrailingWhitespace/>
                        </java>
                        <pom>
                            <includes>
                                <include>pom.xml</include>
                            </includes>
                            <sortPom>
                                <expandEmptyElements>false</expandEmptyElements>
                                <indentSchemaLocation>true</indentSchemaLocation>
                                <nrOfIndentSpace>4</nrOfIndentSpace>
                                <predefinedSortOrder>custom_1</predefinedSortOrder>
                                <sortDependencies>scope,groupId,artifactId</sortDependencies>
                                <sortExecutions>true</sortExecutions>
                                <sortPlugins>scope,groupId,artifactId</sortPlugins>
                            </sortPom>
                        </pom>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>apply</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.10.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <release>${java.version}</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <banDuplicatePomDependencyVersions/>
                                    <requireJavaVersion>
                                        <version>${java.version}</version>
                                    </requireJavaVersion>
                                    <requireMavenVersion>
                                        <version>${maven.version}</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>

    <licenses>
        <license>
            <name>The MIT license</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>fkh</id>
            <name>Frieder Heugel</name>
            <email>{first name} [dot] {last name} [at] gmail [dot] com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/${gitOrga}/${project.artifactId}-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:${gitOrga}/${project.artifactId}-plugin.git</developerConnection>
        <url>https://github.com/${gitOrga}/${project.artifactId}-plugin</url>
        <tag>v2.0.0</tag>
    </scm>

    <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>
