[ERROR] Failed to execute goal on project rhq-jmx-plugin: Could not resolve dependencies for project org.rhq:rhq-jmx-plugin:jar:4.3.0-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.6.0 at specified path /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../lib/tools.jar -> [Help 1] Pom has: <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <version>1.6.0</version> <scope>system</scope> <systemPath>${java.home}/../lib/tools.jar</systemPath> </dependency> See this solution: http://stackoverflow.com/questions/3080437/jdk-tools-jar-as-maven-dependency This works on Mac OS X diff --git a/modules/plugins/jmx/pom.xml b/modules/plugins/jmx/pom.xml index 8780b32..714dc6a 100644 --- a/modules/plugins/jmx/pom.xml +++ b/modules/plugins/jmx/pom.xml @@ -30,7 +30,7 @@ <artifactId>tools</artifactId> <version>1.6.0</version> <scope>system</scope> - <systemPath>${java.home}/../lib/tools.jar</systemPath> + <systemPath>${toolsjar}</systemPath> </dependency> </dependencies> @@ -315,6 +315,30 @@ </plugins> </build> </profile> - </profiles> + <profile> + <id>default-profile</id> + <activation> + <activeByDefault>true</activeByDefault> + <file> + <exists>${java.home}/../lib/tools.jar</exists> + </file> + </activation> + <properties> + <toolsjar>${java.home}/../lib/tools.jar</toolsjar> + </properties> + </profile> + <profile> + <id>mac-profile</id> + <activation> + <activeByDefault>false</activeByDefault> + <file> + <exists>${java.home}/../Classes/classes.jar</exists> + </file> + </activation> + <properties> + <toolsjar>${java.home}/../Classes/classes.jar</toolsjar> + </properties> + </profile> + </profiles> </project>
I'm confused as to why this is still not working. I checked in a fix to master a week or so ago that's similar to the one you're proposing. See https://bugzilla.redhat.com/show_bug.cgi?id=703557, comments 6-9. Can you shed any light?
per bz triage (asantos, ccrouch, mfoley. loleary)
master is working on Mac OS. I was working off an older branch off of master that still was broken. *** This bug has been marked as a duplicate of bug 703557 ***