在Eclipse中创建新的Maven项目时显示错误 [英] Error shown when creating new Maven project in Eclipse

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

问题描述



当我试图在eclipse IDE中在Maven上创建新项目时,它显示以下错误:



无法获取插件执行参数编码的值default-resources
插件org.apache.maven.plugins:maven-resources-plugin:2.5或其一个依赖关系无法解析:无法收集 org.apache.maven.plugins的依赖关系:maven -resources-plugin:jar:2.5()



有人请告诉我要做什么?



可以有人告诉我创建启用Maven的Spring项目的步骤吗?



POM.xml:

 < project xmlns =http ://maven.apache.org/POM/4.0.0xmlns:xsi =http://www.w3.org/2001/XMLSchema-instancexsi:schemaLocation =http://maven.apache.org /POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"> 
< modelVersion> 4.0.0< / modelVersion>
< groupId> com.spring< / groupId>
< artifactId> SpringMaven< / artifactId>
< version> 0.0.1-SNAPSHOT< / version>
< packaging> war< / packaging>
< name> SpringMaven< / name>
< / project>


解决方案

以下步骤适用于我:


  1. 关闭Eclipse。

  2. 导航到用户主目录。 (例如:C:\Users\YourUserName.m2)

  3. 删除repository文件夹。

  4. 重新打开Eclipse

  5. 单击有问题的Maven项目,然后转到项目 - >清洁。

  6. 右键单击项目,并转到Maven - >更新项目...。

  7. 关闭Eclipse。

  8. 打开Eclipse。

  9. 点击项目浏览器窗口中的项目文件夹(通常位于左侧)。

  10. 点击F5键几次以刷新项目

  11. 完成!

这些步骤对我有用。请让我知道,如果我能进一步帮助。


When I am trying to create new project on Maven in eclipse IDE ,It shows the following errors:

"Could not get the value for parameter encoding for plugin execution default-resources Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 ()"

Anyone please tell what I have to do?

can anyone tell me the steps to create Spring project with Maven enabled?

POM.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.spring</groupId>
  <artifactId>SpringMaven</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>SpringMaven</name>
</project>

解决方案

The following steps worked for me:

  1. Close Eclipse.
  2. Navigate to user home directory. (For example: "C:\Users\YourUserName.m2")
  3. Delete the "repository" folder.
  4. Re-open Eclipse.
  5. Click on the Maven project that has an issue and go to "Project" --> "Clean".
  6. Right-click on the project and go to "Maven" --> "Update Project...".
  7. Close Eclipse.
  8. Open Eclipse.
  9. Click on the project folder in the "Project Explorer" window (usually on the left).
  10. Hit the "F5" key a few times to Refresh your project.
  11. Done!

These steps worked for me. Please let me know if I can help further.

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

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