0

I create a simple maven project in eclipse(indigo), it reports an error:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3

I found maven-resources-plugin:2.5 in local repo. I don't understand why my project needs 2.4.3 but not 2.5?

mvn -v:

Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
Maven home: D:\Program Files\maven-3.0
Java version: 1.6.0_31, vendor: Sun Microsystems Inc.
Java home: D:\Program Files\Java\jdk1.6.0_31\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
hiway
  • 3,906
  • 10
  • 34
  • 57
  • Check your pom.xml for 2.4.3 version – udalmik Jul 29 '14 at 10:31
  • possible duplicate of [Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved](http://stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources) – user987339 Jul 29 '14 at 10:32
  • @user987339, I already red this post, I dont understand why new maven project not use 2.5? – hiway Jul 29 '14 at 10:37
  • @udalmik, how to check ? I dont add any plugin or dependency in pom.xml. ` 4.0.0 entry task 0.0.1-SNAPSHOT war ` – hiway Jul 29 '14 at 10:38
  • ok, so default one should be used. strange, it should be fine for 3.0.4 http://maven.apache.org/ref/3.0.4/maven-core/default-bindings.html#Bindings_for_war_packaging – udalmik Jul 29 '14 at 11:44
  • Check if eclipse is not able to connect to Internet. – Neeraj Jul 29 '14 at 11:53
  • You need to change default Maven from eclipse to your Maven. You can change it from preferences. – Neeraj Jul 29 '14 at 11:56

3 Answers3

1

I was facing the same challenge but it got resolved soon as I created the folder under src/main/resources and saved.

  • Answer needs supporting information Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](https://stackoverflow.com/help/how-to-answer). – moken Jul 21 '23 at 11:40
0

I solved it,

just create src/main/java, src/main/resources, src/test/java, src/test/resources

The maven-resources-plugin will disappear.

hiway
  • 3,906
  • 10
  • 34
  • 57
0

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance