<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>3.2</version>
    </parent>

    <groupId>eu.markov.jenkins.plugin.mvnmeta</groupId>
    <artifactId>maven-metadata-plugin</artifactId>
    <version>2.0.0</version>
    <packaging>hpi</packaging>
    <name>Maven Metadata Plugin for Jenkins CI server</name>
    <description>Adds a new build parameter type for resolving artifact versions reading the repository maven-metadata.xml</description>
    <inceptionYear>2012</inceptionYear>

    <url>https://wiki.jenkins.io/display/JENKINS/Maven+Metadata+Plugin</url>

    <scm>
        <connection>scm:git:ssh://github.com/jenkinsci/maven-metadata-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/jenkinsci/maven-metadata-plugin.git</developerConnection>
        <url>https://github.com/jenkinsci/maven-metadata-plugin</url>
        <tag>maven-metadata-plugin-2.0.0</tag>
    </scm>

    <developers>
        <developer>
            <id>markov</id>
            <email>gesh@markov.eu</email>
            <name>Georgi "Gesh" Markov</name>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>marcrohlfs</id>
            <email>Marc.Rohlfs@t-system.com</email>
            <name>Marc Rohlfs</name>
            <timezone>+1</timezone>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Benjamin Bonnet</name>
            <url>https://github.com/bonnetb</url>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>David Portabella</name>
            <url>https://github.com/dportabella</url>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>Dominik Bartholdi</name>
            <url>https://github.com/imod</url>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>Mathieu Pousse</name>
            <url>https://github.com/mathieu-pousse</url>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>Mads Mohr Christensen</name>
            <url>https://github.com/hrmohr</url>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>Nandor Galambosi</name>
            <url>https://github.com/dromie</url>
        </contributor>
        <contributor>
            <name>Robert Kleinschmager</name>
            <url>https://github.com/barclay-reg</url>
            <timezone>+1</timezone>
        </contributor>
    </contributors>

    <licenses>
        <license>
            <name>MIT license</name>
            <comments>All source code is under the MIT license.</comments>
        </license>
    </licenses>

    <!-- get artifacts through repo.jenkins-ci.org -->
    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <properties>
        <jenkins.version>2.32.1</jenkins.version>
        <java.level>8</java.level>
        <maven.compiler.source>1.${java.level}</maven.compiler.source>
        <maven.compiler.target>1.${java.level}</maven.compiler.target>
        <lombok.version>1.12.2</lombok.version>
        <lombok.plugin.version>1.12.2.0</lombok.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>credentials</artifactId>
            <version>1.14</version>
        </dependency>
        <dependency>
            <groupId>com.sonyericsson.hudson.plugins.rebuild</groupId>
            <artifactId>rebuild</artifactId>
            <version>1.25</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>matrix-project</artifactId>
            <version>1.7</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <!-- Automatically create the base configuration for the Jenkins development workspace when it doesn't exist. -->
            <id>prepare-developement-workspace</id>
            <activation>
                <file>
                    <missing>${basedir}/work</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>workspace-base-configuration</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <resources>
                                        <resource>
                                            <directory>${project.basedir}/src/dev/assets/work</directory>
                                            <filtering>true</filtering>
                                        </resource>
                                    </resources>
                                    <outputDirectory>${project.basedir}/work</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>for-development</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencyManagement>
                <dependencies>
                    <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${lombok.version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
            </dependencyManagement>

            <dependencies>
                <dependency>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>lombok-needs-tools-jar</id>
            <activation>
                <file>
                    <exists>${java.home}/../lib/tools.jar</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok-maven-plugin</artifactId>
                        <version>${lombok.plugin.version}</version>
                        <dependencies>
                            <dependency>
                                <groupId>sun.jdk</groupId>
                                <artifactId>tools</artifactId>
                                <version>1.6</version>
                                <scope>system</scope>
                                <systemPath>${java.home}/../lib/tools.jar</systemPath>
                            </dependency>
                        </dependencies>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>delombok</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
