<!-- **************************************************************************
#
# Copyright (c) 2004-2010 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Winston Prakash, Kohsuke Kawaguchi
#
#************************************************************************** --> 

<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.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
        <relativePath /> <!-- avoid cycle -->
    </parent>
    
    <groupId>org.eclipse.hudson.tools</groupId>
    <artifactId>maven-hpi-plugin</artifactId>
    <packaging>maven-plugin</packaging>
  
    <name>Maven hpi Plugin</name>
    <version>3.0.3</version>

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

    <licenses>
        <license>
            <name>Eclipse Public License v1.0</name>
            <url>http://www.eclipse.org/legal/epl-v10.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <scm>
        <connection>scm:git:git://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.maven-hpi-plugin.git</connection>
        <developerConnection>scm:git:git://git.eclipse.org/gitroot/hudson/org.eclipse.hudson.maven-hpi-plugin.git</developerConnection>
        <url>http://git.eclipse.org/c/hudson/org.eclipse.hudson.maven-hpi-plugin.git/</url>
    </scm>

    <developers>
        <developer>
            <id>wjprakash</id>
            <name>Winston Prakash</name>
            <email>Winston.Prakash@gmail.com</email>
            <roles>
                <role>Maintainer</role>
            </roles>
        </developer>
        <developer>
            <name>Many</name>
            <id>kohsuke akozak 8nevil8</id>
            <roles>
                <role>Contributors</role>
            </roles>
        </developer>
    </developers>
    
    <repositories>
        <repository>
            <id>sonatype-nexus-releases</id>
            <name>Sonatype Nexus Releases</name>
            <url>https://oss.sonatype.org/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>  
    </repositories>

    <properties>
        <!-- used for escape -->
        <begin>${${$}}{</begin>
        <end>$}</end>
        <dollar>$</dollar>
        <openbracket>{</openbracket>
        <maven-gpg-plugin.version>1.4</maven-gpg-plugin.version>
        <maven-plugin-plugin.version>2.9</maven-plugin-plugin.version>
        <ant-apache-regexp.version>1.8.3</ant-apache-regexp.version>
        <wagon-ssh.version>2.2</wagon-ssh.version>
        
        <maven-core.version>3.0.4</maven-core.version>
        <maven-model.version>3.0.4</maven-model.version>
        <maven-archiver.version>2.4.1</maven-archiver.version>
       
        <maven-archetype-core.version>1.0-alpha-4</maven-archetype-core.version>
       
        <plexus-archiver.version>2.0.1</plexus-archiver.version>
        <plexus-utils.version>3.0</plexus-utils.version>
 
        <maven-jetty-plugin.version>6.1.1</maven-jetty-plugin.version>
       
        <plexus-interactivity-api.version>1.0-alpha-6</plexus-interactivity-api.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>${maven-plugin-plugin.version}</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>org.apache.ant</groupId>
                        <artifactId>ant-apache-regexp</artifactId>
                        <version>${ant-apache-regexp.version}</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>${wagon-ssh.version}</version>
            </extension>
        </extensions>
    </build>

    <dependencies>
            
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
             
            <version>${maven-core.version}</version>
            <type>jar</type>
        </dependency>
        
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${maven-model.version}</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-archiver</artifactId>
            <version>${maven-archiver.version}</version>
            <type>jar</type>
        </dependency>
        
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-interactivity-api</artifactId>
            <version>${plexus-interactivity-api.version}</version>
            <type>jar</type>
        </dependency>
        <!-- for using annotation processor -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>${plexus-archiver.version}</version>
            <type>jar</type>
        </dependency>
        
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus-utils.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>${maven-jetty-plugin.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.archetype</groupId>
            <artifactId>maven-archetype-core</artifactId>
            <version>${maven-archetype-core.version}</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>2.0.1</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0.1</version>
            <type>jar</type>
        </dependency>
    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven-plugin-plugin.version}</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>
</project>
