Could not calculate build plan :artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 is not available in the local repository

删除回忆录丶 提交于 2019-11-29 06:56:52

If your pom is not specific as to the version of the maven-resources-plugin, that version will come from the superpom. By default, m2e uses an embedded copy of Maven 3.0.x. If the superpom there points to 2.4.3 and your 'outside-of-Eclipse' version asks for something else, then the Maven inside of Eclipse will go looking for 2.4.3 and fail due to the 'offline'.

Fix by configuring m2e to use the Maven installation you are using outside, or turning off 'offline' for one build.

If you want to use maven from your local installation instead of the embedded version that comes with m2e, You have to do this

  • Windows ==> Preferences ==> Maven ==> Installations ==> Click Add (select your local maven installation directory)
Karan Thakur

add below line to your pom.xml and build it through command line using ‘mvn install’. That will download the plugin and then try to build from Eclipse. make sure your Eclipse is using the same Maven not the embeded one. If you are still having issues, delete it from local repository and try again. The line to add is

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</plugin>
</plugins>
</build>

before doing that find where your local repo is, then go to "/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/", remove the contents and do "update dependencies" from Maven.

Just right click on the project in eclipse and in the maven option select update maven project and dont forget to check force update check box and finally hit on ok. It worked for me.

Try Right clicking on POM.xml --> maven --> update project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!