Do not combine maven-eclipse-plugin (eclipse:eclipse) and m2e plugin for
eclipse.

To explain what's happening when you import with m2e:
For maven plugins configured in build scripts to execute on specific build
lifecycle phases m2e needs metadata/info on what to do with them - execute,
ignore, ... when file changes in an eclipse project.
m2e can consume these metadata from build scripts themselves, from m2e
connectors (m2e plugins), or (as of m2e 1.1) from maven plugins. For more
info on this, read http://wiki.eclipse.org/M2E_plugin_execution_not_covered

For the two maven plugins used in Mahout build scripts there are no such
sources of build lifecycle mapping metadata or logic.

maven-antrun-plugin is used basically to copy a resource on compile phase
(see details in pom:
https://svn.apache.org/repos/asf/mahout/trunk/core/pom.xml )
I don't understand yet why isn't this resource named and placed under
src/main/resources so that maven-antrun-plugin can be removed.

As temporary workaround, you can configure lifecycle metadata in mahout
parent pom just to ignore maven-antrun-plugin run goal executions.

Another pom, https://svn.apache.org/repos/asf/mahout/trunk/math/pom.xml ,
makes use of mahout-collections-codegen-plugin to generate sources.
This plugin should include lifecycle mapping metadata, but it does not. SO
as another temporary workaround you can configure lifecycle metadata in
mahout parent pom to execute mahout-collection-codegen-plugin generate goal


Kind regards,
Stevo Slavic.

On Mon, Jul 9, 2012 at 6:03 PM, chenghao liu <[email protected]> wrote:

> try mvn eclipse:eclipse
>
> 2012/7/9 huangjia <[email protected]>
>
> > Hi all,
> >
> > I'm reading Mahout in Action and new to Mahout. Before I can run the code
> > in 2.2.2 Creating a recommender, I think I need to import Mahout into
> > Eclipse first.
> >
> > However,  encountered a problem when trying to import *Mahout*'s source
> > code to eclipse. My steps are as follows.
> >
> > 1 Start Eclipse, click Help->Install new software: enter "m2e -
> > http://download.eclipse.org/technology/m2e/releases";
> > 2 downloaded the Mahout source zip file, unzip it, and put it under the
> > workspace of Eclipse.
> > 3 Start Eclipse, click File->Import->Maven->Existing Maven Projects. Then
> > chose the Mahout source file as the Root Directory.
> >
> > However, when I first tried it, it popped out some errors as in this post
> >
> http://stackoverflow.com/questions/11282737/errors-when-importing-mahouts-maven-resource-to-eclipse
> > .
> > [image: enter image description here]
> >
> > But when I tried it today, the "Next" button becomes gray, so I cannot
> > proceed.
> > [image: Inline image 1]
> > Does anyone have an idea of what's going on?
> >
> > Info: I'm using Eclipse Helios, and mahout distribution 0.7. Is it
> because
> > the Helios does not support Mahout?
> > But it shouldn't, I think, since this person did it successfully.
> >
> http://shuyo.wordpress.com/2011/02/01/mahout-development-environment-with-maven-and-eclipse-1/
> > Or, instead of installing Maven in Eclipse, I should download it
> > separately?
> >
> > Thanks very much!
> >
> > Jia
> >
> >
>

Reply via email to