Recently I encountered this weird problem when i was trying to build a project after installing the m2eclipse plugin on my eclipse galileo. Build id: 20100218-1602
The problem was that when i built the project from command line, it was just working fine, however, as soon as I built the project from eclipse, eclipse started complaining with
1) org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.1 -Dpackaging=maven-plugin -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.1 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
———-
1 required artifact is missing.
for artifact:
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
from the specified remote repositories:
central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
The way it is solved for now is that I added the following dependency to my pom.xml and it seems to work
<plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-resources-plugin</artifactid> <version>2.4.2</version> </plugin> </plugins>
Shankar
Thursday, July 8, 2010
Can you please tell me under which parent tag in the pom.xml we need to paste this tag?
Vikas Hazrati
Friday, July 9, 2010
Sure, you have to put it under
…….
…….
org.apache.maven.plugins
maven-resources-plugin
2.4.2
Shankar
Friday, July 9, 2010
I cannot see the text u have typed 😦
Vikas Hazrati
Tuesday, July 13, 2010
oops sorry i guess this one is better
John
Tuesday, August 10, 2010
I discovered something different. If you look into your repository for the plugin, you might see this:
ls ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.4.1
maven-resources-plugin-2.4.1.maven-plugin.lastUpdated
Note that there is no jar file here.
I deleted that 2.4.1 directory and content, then in eclipse run maven->Update Project Configuration. Then the file downloaded and the build continued.
Tejas
Friday, February 11, 2011
Thanks dude!! I was stuck with this….
This works pretty fine. 🙂
Niraj S
Monday, May 9, 2011
Another way to do it is use Spring Source Tool Suite and **not use ** your local maven settings. Use the default SpringSource maven settings.
NeatTrick
Tuesday, June 14, 2011
Just had the same problem with Eclipse, with maven-resources-plugin.
Adding the plugin definition to the pom solved the problem, but it’s not a good solution when you have several submodules in maven and you don’t want to change all of them.
The trick that solved this was in Eclipse to right click on the project -> Run as -> mvn install
This causes eclipse to download the relevant plugin definition and although I don’t see it in the repository, eclipse is happy and compiling.
Cheers