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/01 22:32:14 UTC

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.)

running mvn eclipse:eclipse used to work.. now I'm getting...

[INFO] Unable to find resource
'org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT' in
repository codehaus-plugins (http://dist.codehaus.org/)
[INFO] Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as
non-aggregator.

I'm new to maven and stumped by what is going on?

-- 
Rick R

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>.
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.

/Anders

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

> On Wed, Feb 3, 2010 at 3:49 AM, Anders Hammar <an...@hammar.net> wrote:
>
> > Ok, first I would like to point you at some Maven books. They are great
> to
> > get the basics:
> > http://books.sonatype.com
> >
>
> Yes I need to read that more thoroughly. I did look through it once and
> tried to refer to even in this case, but it was one of those things where I
> didn't even really know where to look since wasn't sure of the exact cause.
>
>
> > Try this on the command line:
> > mvn org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse
> >
> >
> Perfect! Yes that worked!
>
>
> > By adding the
> > following xml section to your project, you configure Maven to use v2.7 of
> > the plugin (but only when executed for this project or a project that
> > inherits from this):
> >    <build>
> >        <pluginManagement>
> >            <plugins>
> >                <plugin>
> >                    <groupId>org.apache.maven.plugins</groupId>
> >                    <artifactId>maven-eclipse-plugin</artifactId>
> >                    <version>2.7</version>
> >                </plugin>
> >            </plugins>
> >        </pluginManagement>
> >    </build>
> >
> >
> Perfect also! (This is now what I've added to my project's pom so this
> issue
> doesn't keep happening.)
>
>
>
> > The schema for pom.xml is found here:
> > http://maven.apache.org/maven-v4_0_0.xsd
> >
> >
> Ok thanks. Although even looking at that schema it makes it difficult for
> me
> as a newb to look at and say "ok from that schema create the
> pluginManagement definition as you did above.
>
> *So the only last question I have 'Where did things go wrong in my attempt
> to use mvn eclipse:eclipse?' Even if I run just a simple archetype jar (no
> dependency on my company repo) and then run mvn eclipse:eclipse without
> declaring the version like you mentioned I'll get the issue, so I guess
> it's
> something wrong with the eclipse 2.8 snapshot not being in the public repo?
> I would think that if I went to the maven eclipse plugin info
> http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.htmlthat
> it would mention the help you gave me (declaring the version in my pom or
> settings) since I would think others would run into the same issues as
> myself (or else I guess everyone is just more up-to-speed and instantly
> knows what to do.:)
>
>
>
> > As a last point I would like you to talk to your local Maven people as
> > well.
> >   They know
> > your local environment and should be able to help you. I can't solve
> > problems in your local environment.
> >
>
> Ha, I know you can't. But the guy setting the local repo up was newb also.
> We're trying to push for maven to be used here so learning on the fly.
>
> Thanks again for your help. I did learn a LOT through this whole ordeal.
>

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 Rick R <ri...@gmail.com>.
On Wed, Feb 3, 2010 at 3:49 AM, Anders Hammar <an...@hammar.net> wrote:

> Ok, first I would like to point you at some Maven books. They are great to
> get the basics:
> http://books.sonatype.com
>

Yes I need to read that more thoroughly. I did look through it once and
tried to refer to even in this case, but it was one of those things where I
didn't even really know where to look since wasn't sure of the exact cause.


> Try this on the command line:
> mvn org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse
>
>
Perfect! Yes that worked!


> By adding the
> following xml section to your project, you configure Maven to use v2.7 of
> the plugin (but only when executed for this project or a project that
> inherits from this):
>    <build>
>        <pluginManagement>
>            <plugins>
>                <plugin>
>                    <groupId>org.apache.maven.plugins</groupId>
>                    <artifactId>maven-eclipse-plugin</artifactId>
>                    <version>2.7</version>
>                </plugin>
>            </plugins>
>        </pluginManagement>
>    </build>
>
>
Perfect also! (This is now what I've added to my project's pom so this issue
doesn't keep happening.)



> The schema for pom.xml is found here:
> http://maven.apache.org/maven-v4_0_0.xsd
>
>
Ok thanks. Although even looking at that schema it makes it difficult for me
as a newb to look at and say "ok from that schema create the
pluginManagement definition as you did above.

*So the only last question I have 'Where did things go wrong in my attempt
to use mvn eclipse:eclipse?' Even if I run just a simple archetype jar (no
dependency on my company repo) and then run mvn eclipse:eclipse without
declaring the version like you mentioned I'll get the issue, so I guess it's
something wrong with the eclipse 2.8 snapshot not being in the public repo?
I would think that if I went to the maven eclipse plugin info
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html that
it would mention the help you gave me (declaring the version in my pom or
settings) since I would think others would run into the same issues as
myself (or else I guess everyone is just more up-to-speed and instantly
knows what to do.:)



> As a last point I would like you to talk to your local Maven people as
> well.
>   They know
> your local environment and should be able to help you. I can't solve
> problems in your local environment.
>

Ha, I know you can't. But the guy setting the local repo up was newb also.
We're trying to push for maven to be used here so learning on the fly.

Thanks again for your help. I did learn a LOT through this whole ordeal.

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>.
Ok, first I would like to point you at some Maven books. They are great to
get the basics:
http://books.sonatype.com

Then onto your problem. On the command line, you can always force a specific
version. In your case you're trying to use a SNAPSHOT-version (a
devevlopment build version), which is normally not a good idea (unless you
know what you're doing).
Try this on the command line:
mvn org.apache.maven.plugins:maven-eclipse-plugin:2.7:eclipse

That should force Maven to use v2.7 of the plugin. Does it still not work?

The configuration I wrote about does the same thing kind of. By adding the
following xml section to your project, you configure Maven to use v2.7 of
the plugin (but only when executed for this project or a project that
inherits from this):
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

The schema for pom.xml is found here:
http://maven.apache.org/maven-v4_0_0.xsd

As a last point I would like you to talk to your local Maven people as well.
As you do have an Artifactory instance and you have configured to use that
(most likely based on directions by someone as you say you don't have much
Maven knowledge), if things still doesn't work - talk to them! They know
your local environment and should be able to help you. I can't solve
problems in your local environment.

/Anders

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

> On Tue, Feb 2, 2010 at 2:43 PM, Anders Hammar <an...@hammar.net> wrote:
>
> >
> > Also, try what I suggested about specifying the version of the plugin to
> v
> > 2.7.
> >
>
>
> Ok I totally suck at Maven :) I'm trying to figure out how the heck you
> figure out how to declare the above and where you figure out the pom syntax
> for the eclipse plugin to declare the version?
>
> I looked out here
> http://mvnrepository.com/artifact/maven/maven-eclipse-plugin
>
> (I normally go to the above repo look up to determine the pom dependencies
> I
> want to add.)
>
> Obviously it is using 2.8 since after the mvn eclipse:eclipse error I end
> up
> seeing:
>
> 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 above I assume I can build the pom dependency and change it to 2.7
> like you mentioned, but somewhere I must be able to find that pom
> declaration in a repo online somewhere? Just trying to learn the process of
> where I find these things?
>

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 Rick R <ri...@gmail.com>.
On Tue, Feb 2, 2010 at 2:43 PM, Anders Hammar <an...@hammar.net> wrote:

>
> Also, try what I suggested about specifying the version of the plugin to v
> 2.7.
>


Ok I totally suck at Maven :) I'm trying to figure out how the heck you
figure out how to declare the above and where you figure out the pom syntax
for the eclipse plugin to declare the version?

I looked out here
http://mvnrepository.com/artifact/maven/maven-eclipse-plugin

(I normally go to the above repo look up to determine the pom dependencies I
want to add.)

Obviously it is using 2.8 since after the mvn eclipse:eclipse error I end up
seeing:

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 above I assume I can build the pom dependency and change it to 2.7
like you mentioned, but somewhere I must be able to find that pom
declaration in a repo online somewhere? Just trying to learn the process of
where I find these things?

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>.
Ok. I don't know what your artifactory instance does. Possible it proxies
central. Do you have some people managing that you could ask? I'm pretty
sure you've done some configuration in your settings.xml file. Talk to the
people who suggested this configuration.

Also, try what I suggested about specifying the version of the plugin to v
2.7.

/Anders

On Tue, Feb 2, 2010 at 15:58, Rick R <ri...@gmail.com> wrote:

> On Tue, Feb 2, 2010 at 1:56 AM, Anders Hammar <an...@hammar.net> wrote:
>
> > I'm quite sure you must have reconfigured something since last time it
> > worked. The plugin exists in central, and for some reason your build
> isn't
> > looking there.
> >
> > Run
> > mvn help:effective-pom
> > and find the <pluginRepositories> section and paste it in a reply.
> >
> >
>
> <pluginRepositories>
>    <pluginRepository>
>      <snapshots>
>        <enabled>false</enabled>
>      </snapshots>
>      <id>central</id>
>      <url>http://internalcompanyURL:8081/artifactory/plugins-releases
> </url>
>    </pluginRepository>
>    <pluginRepository>
>      <releases>
>        <enabled>false</enabled>
>      </releases>
>      <id>snapshots</id>
>      <url>http://internalcompanyURL:8081/artifactory/plugins-snapshots
> </url>
>    </pluginRepository>
>    <pluginRepository>
>      <releases />
>      <snapshots />
>      <id>codehaus-plugins</id>
>      <url>http://dist.codehaus.org/</url>
>      <layout>legacy</layout>
>    </pluginRepository>
>  </pluginRepositories>
>
> Maybe something's screwed up with the internal artifactory repo?
>
> Thanks so much for the help.
>
> Also, you might want to consider locking the version of the plugin being
> > used. You do that in the pluginManagement section. Currently I think you
> > don't have a version specified, so Maven will try to get the latest
> > (2.8-SNAPSHOT). That may cause issues when a new version is available,
> > which
> > isn't backwardscompatible for some reason. Or possibly you do have the
> > version set to 2.8-SNAPSHOT? You can see that as well in the effective
> pom.
> > http://maven.apache.org/pom.html#Plugin_Management
> > (In this case you only need to specify groupId, artifactId, and version.
> > The
> > latest released version is 2.7, which exists in central.)
> >
> > /Anders
> >
> > On Mon, Feb 1, 2010 at 22:32, Rick R <ri...@gmail.com> wrote:
> >
> > > running mvn eclipse:eclipse used to work.. now I'm getting...
> > >
> > > [INFO] Unable to find resource
> > >
> 'org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT'
> > > in
> > > repository codehaus-plugins (http://dist.codehaus.org/)
> > > [INFO] Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as
> > > non-aggregator.
> > >
> > > I'm new to maven and stumped by what is going on?
> > >
> > > --
> > > Rick R
> > >
> >
>
>
>
> --
> Rick R
>

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 Rick R <ri...@gmail.com>.
On Tue, Feb 2, 2010 at 1:56 AM, Anders Hammar <an...@hammar.net> wrote:

> I'm quite sure you must have reconfigured something since last time it
> worked. The plugin exists in central, and for some reason your build isn't
> looking there.
>
> Run
> mvn help:effective-pom
> and find the <pluginRepositories> section and paste it in a reply.
>
>

<pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <url>http://internalcompanyURL:8081/artifactory/plugins-releases</url>
    </pluginRepository>
    <pluginRepository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <id>snapshots</id>
      <url>http://internalcompanyURL:8081/artifactory/plugins-snapshots
</url>
    </pluginRepository>
    <pluginRepository>
      <releases />
      <snapshots />
      <id>codehaus-plugins</id>
      <url>http://dist.codehaus.org/</url>
      <layout>legacy</layout>
    </pluginRepository>
  </pluginRepositories>

Maybe something's screwed up with the internal artifactory repo?

Thanks so much for the help.

Also, you might want to consider locking the version of the plugin being
> used. You do that in the pluginManagement section. Currently I think you
> don't have a version specified, so Maven will try to get the latest
> (2.8-SNAPSHOT). That may cause issues when a new version is available,
> which
> isn't backwardscompatible for some reason. Or possibly you do have the
> version set to 2.8-SNAPSHOT? You can see that as well in the effective pom.
> http://maven.apache.org/pom.html#Plugin_Management
> (In this case you only need to specify groupId, artifactId, and version.
> The
> latest released version is 2.7, which exists in central.)
>
> /Anders
>
> On Mon, Feb 1, 2010 at 22:32, Rick R <ri...@gmail.com> wrote:
>
> > running mvn eclipse:eclipse used to work.. now I'm getting...
> >
> > [INFO] Unable to find resource
> > 'org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT'
> > in
> > repository codehaus-plugins (http://dist.codehaus.org/)
> > [INFO] Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as
> > non-aggregator.
> >
> > I'm new to maven and stumped by what is going on?
> >
> > --
> > Rick R
> >
>



-- 
Rick R

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>.
I'm quite sure you must have reconfigured something since last time it
worked. The plugin exists in central, and for some reason your build isn't
looking there.

Run
mvn help:effective-pom
and find the <pluginRepositories> section and paste it in a reply.

Also, you might want to consider locking the version of the plugin being
used. You do that in the pluginManagement section. Currently I think you
don't have a version specified, so Maven will try to get the latest
(2.8-SNAPSHOT). That may cause issues when a new version is available, which
isn't backwardscompatible for some reason. Or possibly you do have the
version set to 2.8-SNAPSHOT? You can see that as well in the effective pom.
http://maven.apache.org/pom.html#Plugin_Management
(In this case you only need to specify groupId, artifactId, and version. The
latest released version is 2.7, which exists in central.)

/Anders

On Mon, Feb 1, 2010 at 22:32, Rick R <ri...@gmail.com> wrote:

> running mvn eclipse:eclipse used to work.. now I'm getting...
>
> [INFO] Unable to find resource
> 'org.apache.maven.plugins:maven-eclipse-plugin:maven-plugin:2.8-SNAPSHOT'
> in
> repository codehaus-plugins (http://dist.codehaus.org/)
> [INFO] Cannot find mojo descriptor for: 'eclipse:eclipse' - Treating as
> non-aggregator.
>
> I'm new to maven and stumped by what is going on?
>
> --
> Rick R
>