<?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>io.jenkins.plugins</groupId>
    <artifactId>artifact-repository-parameter</artifactId>
    <version>1.0.1</version>
    <packaging>hpi</packaging>
    <name>Artifact Repository Parameter Plugin</name>
    <description>
        Display information from an artifact repository as Jenkins build parameters.
    </description>
    <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>

    <parent>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>4.6</version>
        <relativePath />
    </parent>

    <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>

    <properties>
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <maven.version>3.6</maven.version>
        <!-- Jenkins specific properties -->
        <jenkins.version>2.190.1</jenkins.version>
        <java.level>8</java.level>
    </properties>

    <build>
        <plugins>
            <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>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M3</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>
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>2.0.3</version>
                    <configuration>
                        <java>
                            <googleJavaFormat>
                                <version>1.7</version>
                                <style>GOOGLE</style>
                            </googleJavaFormat>
                            <endWithNewline />
                            <removeUnusedImports />
                            <trimTrailingWhitespace />
                        </java>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>io.github.phillipuniverse</groupId>
                    <artifactId>githook-maven-plugin</artifactId>
                    <version>1.0.5</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>install</goal>
                            </goals>
                            <configuration>
                                <hooks>
                                    <pre-push>
                                        # First stash all unstaged files, then apply styles to all
                                        # files on disk. Afterwards commit any changed file and then
                                        # get the stashed and untracked files back.

                                        git stash -q --keep-index
                                        mvn spotless:apply
                                        RESULT=$?
                                        git add -A
                                        git commit -m "Format code according to styleguide" || true
                                        git stash pop -q
                                        exit $RESULT
                                    </pre-push>
                                </hooks>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <!-- 3rd party jenkins plugins this plugin depends on -->
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>apache-httpcomponents-client-4-api</artifactId>
            <version>4.5.10-2.0</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>credentials</artifactId>
            <version>2.3.0</version>
        </dependency>
        <!-- 3rd party libraries this plugin depends on -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.10</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20200518</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.10</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.plugins</groupId>
            <artifactId>structs</artifactId>
            <version>1.20</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci</groupId>
            <artifactId>symbol-annotation</artifactId>
            <version>1.20</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-api</artifactId>
            <version>2.36</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-basic-steps</artifactId>
            <version>2.18</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-cps</artifactId>
            <version>2.74</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-durable-task-step</artifactId>
            <version>2.34</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-job</artifactId>
            <version>2.35</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins.workflow</groupId>
            <artifactId>workflow-step-api</artifactId>
            <version>2.20</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.26</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.26</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <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>

    <scm>
        <connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
        <developerConnection>
            scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git
        </developerConnection>
        <url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
        <tag>v1.0.1</tag>
    </scm>

</project>
