<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.kohsuke.stapler</groupId>
    <artifactId>stapler-parent</artifactId>
    <version>1.231</version>
  </parent>
  
  <artifactId>stapler-jelly</artifactId>
  <name>Stapler Jelly module</name>
  <description>Jelly binding for Stapler</description>
  
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>stapler</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci</groupId>
      <artifactId>commons-jelly</artifactId>
      <version>1.1-jenkins-20120928</version>
      <exclusions>
        <exclusion>
          <groupId>dom4j</groupId>
          <artifactId>dom4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jenkins-ci.dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1-jenkins-4</version>
    </dependency>
    <dependency><!-- only needed for annotations, hence optional -->
      <groupId>org.jvnet.maven-jellydoc-plugin</groupId>
      <artifactId>jellydoc-annotations</artifactId>
      <version>1.2</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.4</version>
      <scope>provided</scope>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>stapler</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>htmlunit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kohsuke.metainf-services</groupId>
      <artifactId>metainf-services</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.kohsuke.stapler</groupId>
      <artifactId>stapler-adjunct-jquery</artifactId>
      <version>1.8.3-0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jvnet.hudson</groupId>
      <artifactId>commons-jelly-tags-define</artifactId>
      <version>1.0.1-hudson-20071021</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>dom4j</groupId>
          <artifactId>dom4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-cli</groupId>
          <artifactId>commons-cli</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jvnet.hudson</groupId>
          <artifactId>commons-jelly</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jvnet.maven-jellydoc-plugin</groupId>
        <artifactId>maven-jellydoc-plugin</artifactId>
        <version>1.2</version>
        <dependencies>
          <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <scope>system</scope>
            <version>1.6</version>
            <systemPath>${toolsjar}</systemPath>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jvnet.maven-jellydoc-plugin</groupId>
            <artifactId>maven-jellydoc-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>jellydoc</goal>
                </goals>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
                <scope>system</scope>
                <version>1.6</version>
                <systemPath>${toolsjar}</systemPath>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>

      <reporting>
        <plugins>
          <plugin>
            <groupId>org.jvnet.maven-jellydoc-plugin</groupId>
            <artifactId>maven-jellydoc-plugin</artifactId>
            <version>1.2</version>
          </plugin>
        </plugins>
      </reporting>
    </profile>
    <profile>
      <id>sane-jdk</id>
      <activation>
        <file>
          <exists>${java.home}/../lib/tools.jar</exists>
        </file>
      </activation>
      <properties>
        <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
      </properties>
    </profile>
    <profile>
      <id>osx-jdk</id>
      <activation>
        <file>
          <exists>${java.home}/../Classes/classes.jar</exists>
        </file>
      </activation>
      <properties>
        <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
      </properties>
    </profile>
  </profiles>
</project>

