I\'m trying to create a maven project by following this tutorial https://docs.mulesoft.com/mule-user-guide/v/3.7/building-a-mule-application-with-maven-in-studio that time t
I think that is problem with your mule studio Java setting. Mule studio by default points JRE not JDK. tools.jar is available under JDK folder. See the below link which tell you how to add JDK to studio then use that to build
http://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx
If you are facing with below error from Anypoint studio when building project with Maven.
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre1.8.0_162/../lib/tools.jar @
[ERROR] Unknown packaging: mule @ line 9, column 16
[WARNING] 'dependencies.dependency.systemPath' for com.sun:tools:jar refers to a non-existing file C:\Program Files\Java\jre1.8.0_162C:\Program Files\Java\jdk1.8.0_162\lib\tools.jar @ line 75, column 21
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.mycompany:maven-test1:1.0.0-SNAPSHOT (C:\Users\Venkata Phanindra\AnypointStudio\workspace\maven-test1\pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre1.8.0_162/../lib/tools.jar -> [Help 2]
[ERROR] Unknown packaging: mule @ line 9, column 16
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2]
http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
Please follow the below steps to resolve the issue
Now try to update the pom.xml file by Right clicking the pom.xml file Mule -> Update project dependencies.
If still you are facing the issue follow the another step as below:
This will solve the issue.
I have faced same issue and got resolved by changing the JRE to JDK in preferences and restarted the any point studio. This resolved the issue to me.
Check whether your MuleStudio.ini contains the configration for the correct path of your JDK:
-vm
C:\Path\To\Your\JDK\bin\javaw
I solved the problem, I don't know exactly what has worked but I changed the java version and for every project I execute the following commands:
mvn clean install
mvn eclipse:eclipse
and then i refresh my project This can help: http://www.avajava.com/tutorials/lessons/how-do-i-update-my-maven-project-to-work-in-eclipse.html
I was getting the same error and I solved it by not just adding JDK in the installed JREs but setting Execution environment of JAVASE-1.8 to jdk1.8 and it worked. enter image description here