创建Maven项目时出错 [英] Error Creating a Maven Project

查看:90
本文介绍了创建Maven项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过遵循本教程

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 that time when Studio builds the Maven Project automatically, I get this error : updating maven project has encountered a problem There was an error running the studio:studio goal on project test and in the console:

[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.mycompany:test:1.0.0-SNAPSHOT (C:\Users\Rajeun\AnypointStudio\workspace\test\pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.1 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 (x86)\Java\jre1.8.0_40/../lib/tools.jar -> [Help 2]
[ERROR]     Unknown packaging: mule @ line 8, 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

推荐答案

我解决了这个问题,我不知道确切的解决方法,但是我更改了Java版本,并且对于每个项目,我都执行以下命令:

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

这篇关于创建Maven项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆