在Eclipse中创建新的Maven项目时显示错误 [英] Error shown when creating new Maven project in Eclipse
问题描述
当我试图在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>
以下步骤适用于我:
- 关闭Eclipse。
- 导航到用户主目录。 (例如:C:\Users\YourUserName.m2)
- 删除repository文件夹。
- 重新打开Eclipse
- 单击有问题的Maven项目,然后转到项目 - >清洁。
- 右键单击项目,并转到Maven - >更新项目...。
- 关闭Eclipse。
- 打开Eclipse。
- 点击项目浏览器窗口中的项目文件夹(通常位于左侧)。
- 点击F5键几次以刷新项目
- 完成!
这些步骤对我有用。请让我知道,如果我能进一步帮助。
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:
- Close Eclipse.
- Navigate to user home directory. (For example: "C:\Users\YourUserName.m2")
- Delete the "repository" folder.
- Re-open Eclipse.
- Click on the Maven project that has an issue and go to "Project" --> "Clean".
- Right-click on the project and go to "Maven" --> "Update Project...".
- Close Eclipse.
- Open Eclipse.
- Click on the project folder in the "Project Explorer" window (usually on the left).
- Hit the "F5" key a few times to Refresh your project.
- Done!
These steps worked for me. Please let me know if I can help further.
这篇关于在Eclipse中创建新的Maven项目时显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!