<?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/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>gl-common</artifactId>
    <groupId>org.grouplens.common</groupId>
    <version>0.8</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>common-javadoc</artifactId>

  <name>JavaDoc Extensions</name>
  <description>
    Various JavaDoc taglets we use in GroupLens JavaDoc.
  </description>

  <dependencies>
    <dependency>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
      <version>1.4.2</version>
      <scope>system</scope>
      <systemPath>${tools.jar}</systemPath>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <!-- On Linux, we can find tools.jar in the JDK surrounding the JRE. -->
      <id>standard-jdk</id>
      <activation>
        <file>
          <exists>${java.home}/../lib/tools.jar</exists>
        </file>
      </activation>
      <properties>
        <tools.jar>${java.home}/../lib/tools.jar</tools.jar>
      </properties>
    </profile>

    <profile>
      <!-- Mac JDKs bundle things a bit differently. -->
      <id>mac-jdk</id>
      <activation>
        <file>
          <exists>${java.home}/../Classes/classes.jar</exists>
        </file>
      </activation>
      <properties>
        <tools.jar>${java.home}/../Classes/classes.jar</tools.jar>
      </properties>
    </profile>

    <profile>
      <!-- We look for a JDK installed alongside the JRE. We need a better way to do this. -->
      <id>win-jdk</id>
      <activation>
        <file>
          <exists>${java.home}/../jdk${java.version}/lib/tools.jar</exists>
        </file>
      </activation>
      <properties>
        <tools.jar>${java.home}/../jdk${java.version}/lib/tools.jar</tools.jar>
      </properties>
    </profile>
  </profiles>
</project>