I want to checkout sonar, so I added the following snippet to my pom.xml the dependency part was taken from http://maven.apache.org/general.html#tools-jar-dependency
<
A problem I had once was different location of tools.jar under Mac OS. Here's the profiles section to solve the problem:
java-home-parent-lib-tools-jar
false
${java.home}/../lib/tools.jar
sun.jdk
tools
1.5.0
system
${java.home}/../lib/tools.jar
java-home-parent-classes-classes-jar
false
${java.home}/../Classes/classes.jar
sun.jdk
tools
1.5.0
system
${java.home}/../Classes/classes.jar
However I am not sure this is something you're facing.