<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License

Copyright (c) 2004-2011, Oracle Corporation, Kohsuke Kawaguchi,
Daniel Dyer, Erik Ramfelt, Stephen Connolly, Tom Huybrechts, Alan Harder, Anton Kozak, Nikita Levyankov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<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.2.1</version>
    <relativePath>../hudson-parent/pom.xml</relativePath>
  </parent>

  <groupId>org.jvnet.hudson.plugins</groupId>
  <artifactId>hudson-plugin-parent</artifactId>
  <name>Hudson :: Plugin Parent POM</name>
  <version>2.2.1 </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>

    <servlet-api.version>2.4</servlet-api.version>
  </properties>

  <scm>
    <connection>scm:git:git://github.com/hudson/hudson.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/hudson/hudson.git</developerConnection>
    <url>https://github.com/hudson/hudson</url>
  </scm>

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

  <dependencies>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-war</artifactId>
      <type>war</type>
      <version>${project.parent.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-core</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson.main</groupId>
      <artifactId>hudson-test-framework</artifactId>
      <version>${project.parent.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-easymock</artifactId>
      <version>${powermock.version}</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>${easymock.version}</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito-core.version}</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet-api.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  
  <build>
    <finalName>${project.artifactId}</finalName>
    <defaultGoal>package</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.hudsonci.stapler</groupId>
        <artifactId>maven-stapler-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
      <plugin>
        <groupId>org.jvnet.localizer</groupId>
        <artifactId>maven-localizer-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <fileMask>Messages.properties</fileMask>
              <outputDirectory>target/generated-sources/localizer</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <name>hudson.udp</name>
              <value>33849</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
  <profiles>
    <profile>
      <id>activate-hpi-extension</id>
      <!--
       |
       | We do not want this extension loaded while we are building in the Hudson reactor itself, but it must
       | be loaded while someone is building an HPI. So we will only activate the loading of the extension if we
       | are outside the Hudson build structure.
       |
       -->
      <activation>
        <file>
          <missing>../.hudson</missing>      
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jvnet.hudson.tools</groupId>
            <artifactId>maven-hpi-plugin</artifactId>
            <version>${maven-hpi-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <showDeprecation>true</showDeprecation>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>  
</project>
