You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rick R <ri...@gmail.com> on 2010/02/03 20:40:56 UTC

Had to remove a plugin dir from local repo, why? [was Re: what does it mean with this error when trying to run mvn eclipse:eclipse (Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as non-aggregator.)

I changed the subject since I think this is now more of a general local
repository question.

On Wed, Feb 3, 2010 at 2:08 PM, Anders Hammar <an...@hammar.net> wrote:

> Regarding why Maven tries to use 2.8-SNAPSHOT and isn't successful I'm
> somewhat puzzled. You didn't post the full error output, so I can't say for
> sure. Also, I need to know more about your Artifactory setup to spot the
> problem.
>


Ok, this is really weird, how could one's existing local repository affect
things? I was going to post a long email of things I've tried but the bottom
line is that when I went in to my local repository and deleted:
org/apache/maven/plugins/maven-eclipse-plugin/

The, 'mvn eclipse:eclipse' command worked just fine - the plugin downloaded
fine  ( I was trying this off a simple archetype jar project not using the
artifactory repo.)

I knew something had to be up since when I backed up (moved my repository to
repo.bak) and then ran mvn eclipse:eclipse the eclipse plugin worked just
fine. As soon as I put my old repo back I got the failure error shown at the
end of this post.

So now my question is: why in the world would my local repository affect
this? Did I have some kind of corrupt version of the plugin?

Here was the error I WAS getting BEFORE I manually removed the
maven-eclipse-plugin dir from my repo


[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check
that the goal name is correct: Unable to download the artifact from any
repository

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-eclipse-plugin -Dversion=2.8-SNAPSHOT
-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-eclipse-plugin -Dversion=2.8-SNAPSHOT
-Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[id]


  org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


  org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

Re: Had to remove a plugin dir from local repo, why? [was Re: what does it mean with this error when trying to run mvn eclipse:eclipse (Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as non-aggregator.)

Posted by Wayne Fay <wa...@gmail.com>.
> When you deleted the local repo Maven had to go out to find the latest
> version, which now was 2.7 (served by your artifactory instance). Thus

To avoid weird issues, you should use the "long form" when using
plugins from the command line:
mvn groupid:artifactid:version:goal

So for eclipse, it would be:
mvn org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse

You can see this in the "full name" area in the documentation for this
goal in the plugin:
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Had to remove a plugin dir from local repo, why? [was Re: what does it mean with this error when trying to run mvn eclipse:eclipse (Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as non-aggregator.)

Posted by Anders Hammar <an...@hammar.net>.
Yes, I was actually thinkign about this possibility after sending the mail.
This is what I think has happened:

1. You've run mvn eclipse:eclipse, which will get the latest version of the
plugin. You then had a setup that included the Apache snapshot repo so you
got 2.8-snapshot.
2. The setup changed. Either locally or in artifactory. Only you know which.
3. You try again. Maven sees in the local repo that there is a snapshot
version (2.8-SNAPSHOT) and Maven then tries to update that (Maven updates
once a day by default). As the setup has changed, Maven can't get the
snapshot version.

When you deleted the local repo Maven had to go out to find the latest
version, which now was 2.7 (served by your artifactory instance). Thus
everything worked.

/Anders

On Wed, Feb 3, 2010 at 20:40, Rick R <ri...@gmail.com> wrote:

> I changed the subject since I think this is now more of a general local
> repository question.
>
> On Wed, Feb 3, 2010 at 2:08 PM, Anders Hammar <an...@hammar.net> wrote:
>
> > Regarding why Maven tries to use 2.8-SNAPSHOT and isn't successful I'm
> > somewhat puzzled. You didn't post the full error output, so I can't say
> for
> > sure. Also, I need to know more about your Artifactory setup to spot the
> > problem.
> >
>
>
> Ok, this is really weird, how could one's existing local repository affect
> things? I was going to post a long email of things I've tried but the
> bottom
> line is that when I went in to my local repository and deleted:
> org/apache/maven/plugins/maven-eclipse-plugin/
>
> The, 'mvn eclipse:eclipse' command worked just fine - the plugin downloaded
> fine  ( I was trying this off a simple archetype jar project not using the
> artifactory repo.)
>
> I knew something had to be up since when I backed up (moved my repository
> to
> repo.bak) and then ran mvn eclipse:eclipse the eclipse plugin worked just
> fine. As soon as I put my old repo back I got the failure error shown at
> the
> end of this post.
>
> So now my question is: why in the world would my local repository affect
> this? Did I have some kind of corrupt version of the plugin?
>
> Here was the error I WAS getting BEFORE I manually removed the
> maven-eclipse-plugin dir from my repo
>
>
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] A required plugin was not found: Plugin could not be found - check
> that the goal name is correct: Unable to download the artifact from any
> repository
>
> 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-eclipse-plugin -Dversion=2.8-SNAPSHOT
> -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-eclipse-plugin -Dversion=2.8-SNAPSHOT
> -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url]
> -DrepositoryId=[id]
>
>
>  org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT
>
> from the specified remote repositories:
>  central (http://repo1.maven.org/maven2)
>
>
>  org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT
>
> from the specified remote repositories:
>  central (http://repo1.maven.org/maven2)
>