<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.jvnet.hudson</groupId>
        <artifactId>hudson-parent</artifactId>
        <version>2.1.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.jvnet.hudson.tools</groupId>
    <artifactId>maven-hpi-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <name>Maven hpi Plugin</name>
    <version>3.0.1</version>

    <description>
        Support for developing Hudson plugins with Apache Maven.
    </description>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <!-- used for escape -->
        <begin>${${$}}{</begin>
        <end>$}</end>
        <dollar>$</dollar>
        <openbracket>{</openbracket>
        <maven-gpg-plugin.version>1.2</maven-gpg-plugin.version>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <goalPrefix>hpi</goalPrefix>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- maven resources plugin can't handle escapes, so we need to fall back to Ant to get the job done -->
                        <phase>process-resources</phase>
                        <configuration>
                            <tasks>
                                <property name="hudson.version" value="${project.version}" />
                                <ant antfile="${basedir}/copyArchetype.xml" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-apache-regexp</artifactId>
                        <version>1.6.5</version>
                        <scope>runtime</scope>
                    </dependency>
                    <dependency>
                        <groupId>jakarta-regexp</groupId>
                        <artifactId>jakarta-regexp</artifactId>
                        <version>1.4</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>1.0-beta-7</version>
            </extension>
        </extensions>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-archiver</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.1</version>
        </dependency>
        <!-- for the create goal -->
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-archetype-plugin</artifactId>
            <version>1.0-alpha-4</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-interactivity-api</artifactId>
            <version>1.0-alpha-4</version>
        </dependency>
        <!-- for using annotation processor -->
        <dependency>
            <groupId>org.kohsuke.stapler</groupId>
            <artifactId>maven-stapler-plugin</artifactId>
            <version>1.16</version>
            <!-- make sure to exclude servlet so that the one in Jetty (which has different groupId) will win -->
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jaxen</groupId>
                    <artifactId>jaxen</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>2.6</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:git://github.com/hudson/maven-hpi-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:hudson/maven-hpi-plugin.git</developerConnection>
        <url>https://github.com/hudson/maven-hpi-plugin</url>
    </scm>

    <developers>
        <developer>
            <name>Many</name>
            <id>kohsuke wjprakash akozak 8nevil8</id>
        </developer>
    </developers>
</project>
