Friday, June 29, 2007

Work-around to: Unable to find the mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-1:copy-dependencies'

Just wanted to let you all know. If you are getting this error:
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-1:copy-dependencies':
Unable to find the mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-1:copy-dependencies'
in the plugin 'org.apache.maven.plugins:maven-dependency-plugin'

Component descriptor cannot be found in the component repository:
org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-dependency-plugin:2.0-alpha-1:copy-dependencies.
Then you are not alone. I did too :-) But, after some debugging, I found it to be due to a multi module build of mine, where the first built module had a plugin that internally depended upon version 2.0-alpha-1 of the maven-dependency-plugin, and a later plugin not being compatible with that version.

Luckily, both plugins that depended upon the maven-dependency-plugin could work with version 2.0-alpha-4 instead, so doing the following in my top-level pom worked around the problem:
    <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0-alpha-4</version>
</plugin>
</plugins>
</build>

6 comments:

Nitin said...

My problem was
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-clover-plugin:2.3:instrumentI
find the mojo 'org.apache.maven.plugins:maven-clover-plugin:2.3:instrumentInternal' in the plugin 'org.apache.maven.plug
gin'
org/apache/tools/ant/taskdefs/Definer

It was clover licence issue.
nothing else

Aleksei said...

Thanks a lot!
Your post saved me few hours.

Tech Per said...

@aleksei: Glad it could be of any help :-)

Clive said...

... what Aleksei said :)
Thanks man! :D
Cheers,
C

Mika said...

I am getting this same error with maven-clover-plugin:2.4.1. Where I could get that 2.3. version ?

Jacob von Eyben said...

You just saved my evening.

BTW: Should I have known this already? :-)