tools.jar location is system dependent

piercew avatarpiercew 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.