Error Creating a Maven Project

后端 未结 9 1008
遥遥无期
遥遥无期 2021-01-04 11:38

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

9条回答
  •  庸人自扰
    2021-01-04 12:16

    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

    1. From Anypoint studio goto Windows -> Preferences -> Installed JREs.
    2. Here change the JRE (C:\Program Files\Java\jre1.8.0_162) to your JDK (C:\Program Files\Java\jdk1.8.0_162) and select the JDK checkbox and click Finish -> ok -> ok.

    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:

    1. Goto Windows -> preferences -> Installed JREs -> Execution Environment Here select JavaSE-1.8 and on right window click on the jdk1.8.0_162 [perfect match] and now try to Update project dependencies.

    This will solve the issue.

提交回复
热议问题