I recently upgraded to Java7 on my Macbook Pro. I downloaded the JDK (not the JRE).
» javac version
javac 1.7.0_17
» echo $JAVA_HOME
/Library/Java/Java
I got the following error on a maven project: Failed to execute goal on project cobertura-maven-plugin: Could not resolve dependencies for project org.codehaus.mojo:cobertura-maven-plugin:maven-plugin:2.6: Could not find artifact com.sun:tools:jar:0 at specified path /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../lib/tools.jar -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project cobertura-maven-plugin: Could not resolve dependencies for project org.codehaus.mojo:cobertura-maven-plugin:maven-plugin:2.6: Could not find artifact com.sun:tools:jar:0 at specified path /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/../lib/tools.jar
I fixed it by creating a lib dir under /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents and adding tools.jar to it.
Full path would be this for tools.jar in this particular instance: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/lib/tools.jar