tools.jar location is system dependent

Issue #26 resolved
piercew
created an issue

Mac has tools.jar in a different place. You can fix this in the pom.xml by using a profile. (answer included)

Stealing from the log4j/1.2.16 pom.xml:

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

<profiles> <profile> <id>mac</id> <activation> <os> <family>mac</family> </os> </activation> <properties> <tools.jar>${java.home}/../Classes/classes.jar</tools.jar> <m2_repo>${user.home}/.m2/repository</m2_repo> <ntdll_target>build</ntdll_target> </properties> </profile> <profile> <id>default</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <tools.jar>${java.home}/../lib/tools.jar</tools.jar> <m2_repo>${user.home}/.m2/repository</m2_repo> <ntdll_target>build</ntdll_target> </properties> </profile> </profiles>

Comments (2)

  1. Log in to comment