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

  <groupId>org.jvnet.hudson.plugins</groupId>
  <artifactId>plugin</artifactId>
  <name>Hudson plugin POM</name>
  <version>1.388</version>
  <packaging>pom</packaging>

  <properties>
    <!-- if your java.net user name is different from local user name, specify it here -->
    <java.net.id>${user.name}</java.net.id>
  </properties>

  <!--
    We need the following because the artifactId=plugin but directoryName=plugins, and
    Maven infers the wrong value if I don't specify it explicitly.
  -->
  <scm>
    <connection>scm:svn:https://guest@svn.java.net/svn/hudson~svn/trunk/hudson/plugins/</connection>
    <developerConnection>scm:svn:https://svn.java.net/svn/hudson~svn/trunk/hudson/plugins/</developerConnection>
    <url>https://svn.java.net/svn/hudson~svn/trunk/hudson/plugins/</url>
  </scm>

  <issueManagement>
    <system>JIRA</system>
    <url>http://issues.hudson-ci.org/</url>
  </issueManagement>

  <dependencyManagement>
    <dependencies>
      <dependency><!-- if a plugin wants to depend on the maven plugin, choose the right version automatically -->
        <groupId>org.jvnet.hudson.main</groupId>
        <artifactId>maven-plugin</artifactId>
        <version>1.388</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-war</artifactId>
      <type>war</type>
      <version>1.388</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-core</artifactId>
      <version>1.388</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-test-harness</artifactId>
      <version>1.388</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>ui-samples-plugin</artifactId>
      <version>1.388</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.3.1</version>
      <scope>test</scope>
    </dependency>
    <!--
      Maven is so brain-dead that when a dependency is like:

      plugin -(provided)-> hudson-core -(compile)-> stapler -(provided)-> servlet-api

      Artifacts beyond the provided/provided dependency will not be made available to the plugin.
      See this in DefaultArtifactFactory.createArtifact() in the maven-artifact module.

      So for us to have servlet API in the classpath, we need to explicitly list servlet-api.
    -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.4</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <!--dependencyManagement>
       <dependencies>
       <dependency>
       <groupId>org.jvnet.hudson.main</groupId>
       <artifactId>maven-plugin</artifactId>
       <version>1.388</version>
       </dependency>
       </dependencies>
       </dependencyManagement-->

  <build>
    <!--
      Since new versions need to overwrite old versions, it's better
      not to have version number in the .hpi file name.
    -->
    <finalName>${project.artifactId}</finalName>
    <!--
      I don't really understand how this works, but it makes Maven recognizes
      <packaging>hpi</packaging> defined in maven-hpi-plugin.

      <extensions>true</extensions> is apparently needed to have Maven read
      the plugin's Plexus component file.
    -->
    <defaultGoal>package</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.jvnet.hudson.tools</groupId>
        <artifactId>maven-hpi-plugin</artifactId>
        <version>1.54</version>
        <extensions>true</extensions>
        <configuration>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.kohsuke.stapler</groupId>
        <artifactId>maven-stapler-plugin</artifactId>
        <version>1.12</version>
        <extensions>true</extensions>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0-beta-9</version>
        <configuration>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jvnet.localizer</groupId>
        <artifactId>maven-localizer-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <fileMask>Messages.properties</fileMask>
              <outputDirectory>target/generated-sources/localizer</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!--
          javadoc plugin 2.3 apparently interferes with the release process,
          so sticking to 2.2 (http://www.nabble.com/description-setting-plugin-tp14846399p14950047.html)
        -->
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.2</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.groovy.maven</groupId>
        <artifactId>gmaven-plugin</artifactId>
        <version>1.0-rc-5</version>
        <executions>
          <execution>
            <id>test-in-groovy</id>
            <!-- allow tests written in Groovy -->
            <goals>
              <goal>generateTestStubs</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.6.5</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <name>hudson.udp</name>
              <value>33849</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>m.g.o-public</id>
      <url>http://maven.glassfish.org/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>m.g.o-public</id>
      <url>http://maven.glassfish.org/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

</project>
