<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.tools</groupId>
    <artifactId>tools</artifactId>
    <version>1.6</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  
  <artifactId>maven-hpi-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  
  <name>Maven Hudson Plugin</name>
  <version>1.21</version>
  <description>Maven2 plugin for developing Hudson plugins</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>

  <repositories>
    <repository>
      <id>java.net</id>
      <url>http://download.java.net/maven/1/</url>
      <layout>legacy</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>java.net2</id>
      <url>http://download.java.net/maven/2/</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  
  <!--pluginRepositories>
    <pluginRepository>
      <id>java.net2</id>
      <url>http://download.java.net/maven/2/</url>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories-->

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>archetype-resources/**/*</exclude>
        </excludes>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <goalPrefix>hpi</goalPrefix>
        </configuration>
      </plugin>
      <plugin>
        <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>
                <copy todir="target/classes">
                  <fileset dir="src/main/resources" includes="archetype-resources/**/*" />
                  <filterset>
                    <filter token="PLUGIN_VERSION" value="${project.version}" />
                  </filterset>
                </copy>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <properties>
    <!-- used for escape -->
    <begin>${${$}}{</begin>
    <end>$}</end>
    <dollar>$</dollar>
    <openbracket>{</openbracket>
  </properties>

  <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>
      <type>maven-plugin</type>
      <version>6.1.1</version>
    </dependency>
    <!-- for the create goal -->
    <dependency>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-archetype-plugin</artifactId>
      <type>maven-plugin</type>
      <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 the upload goal -->
    <dependency>
      <groupId>javanettasks</groupId>
      <artifactId>javanettasks</artifactId>
      <version>1.0.16</version>
    </dependency>
    <!-- for using annotation processor -->
    <dependency>
      <groupId>org.kohsuke.stapler</groupId>
      <artifactId>maven-stapler-plugin</artifactId>
      <version>1.6</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>
      </exclusions>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
  
  <distributionManagement>
    <site>
      <id>hudson-www</id>
      <url>java-net:/hudson/trunk/www/maven-hpi-plugin/</url>
    </site>
  </distributionManagement>

  <scm>
    <connection>scm:svn:https://svn.dev.java.net/svn/hudson/tags/maven-hpi-plugin-1.21</connection>
    <developerConnection>scm:svn:https://svn.dev.java.net/svn/hudson/tags/maven-hpi-plugin-1.21</developerConnection>
    <url>https://hudson.dev.java.net/source/browse/hudson/tags/maven-hpi-plugin-1.21</url>
  </scm>
</project>
