Be sure not to confuse the maven eclipse plugin with the eclipse maven
plugin.

----------------

The former is a plugin for maven 2 that allows "mvn eclipse:eclipse" to
create .classpath and .project as Man-Chi explained.

---------------

The latter is a plugin for eclipse that supports maven. It adds a bunch of
features to eclipse to do things like:

* create appropriate classpath entries any time you edit the POM for a
project.
* let you search the repository for particular jars (there are some issues
with this feature as relates to the local repository)
* do external builds with Maven (I haven't gotten this to work)
* fix up source folder settings in eclipse

---------------

Notes for Roland:

M2_REPO is an eclipse variable that ties into the entries the maven eclipse
plugin puts in the .classpath for an eclipse project

The preference setting for local repository is, I think, supposed to point
to the "<local user directory>/.m2/repository" folder. (In windows thats
something like "c:\Documents and Settings\<userid>\.m2\repository".)

I haven't been able to get the M2 external build to work. I don't get the
same error you do. But it works fine to add a plain external build that runs
mvn.bat (in the windows case) when starting in the folder containing the
POM.xml you want to build. The arguments would be things like "install" or
"-e site" or whatever.

-- Lee

On 1/5/06, Man-Chi Leung <[EMAIL PROTECTED]> wrote:
>
> eclipse  plugin is already come with m2 by default
>
> the following command will create .classpath and .project files for
> eclipse.
> $mvn eclipse:eclipse
>
> u also need to add your .m2/repository parameter to eclipse as the
> following:
> $mvn -Declipse.workspace=<YOUR_ECLIPSE_WORKSPACE_DIR> eclipse:add-
> maven-repo
>
> from eclipse u may run as external tools: check out this instructions
> http://maven.apache.org/guides/mini/guide-ide-eclipse.html
>
> in fact, I perfer to run via CLI , that is faster
>
> ~manchi
>
> On Jan 5, 2006, at 9:53 PM, Roland Oertig wrote:
>
> > Hi
> >
> > I downloaded and use the maven-plugin offered on the Appache
> > http://maven.apache.org/eclipse-plugin.html .
> >
> > After having spent hours "googeling" around, to try to find some
> > documents
> > or hints how to use the m2 plugin in eclipse with run--> external
> > tools -->
> > m2 build in the popup window "Create, manage and run
> > configurations", I have
> > to give up and hope that one of you guys can help me.
> >
> >
> >
> > In the eclipse Windows --> Preferences --> Maven2 I set the local
> > Repository
> > folder to C:\maven-2.0.1
> >
> > and to Java --> Classpath Variables I added M2_REPO and MAVEN_REPO
> > (just to
> > be sure) to point to my local repository (e.g. E:\maven
> > \localrepository)
> >
> >
> >
> > Next I try to start a maven goal through the run --> external tools:
> >
> > I entered the base directory (e.g. E:/myApp) and goal (e.g.
> > install) in the
> > requested fields.
> >
> >
> >
> > It return immediately with an information in the border of the
> > console view
> > window, like:
> >
> > <terminated>myApp[m2 build}
> > C:\Program\Java\jre1.5.0\bin\javaw.exe(05.01.20006 14:20:34)
> >
> >
> >
> > I tried to also write the output to a logfile but nothing gets written
> > there, but the file gets created. The only info I get on the
> > console is:
> >
> > [Console output redirected to file:E:\HotelDatabase\maven_eclipse_run]
> >
> >
> >
> > If I run m2 from the windows command line everything goes perfect.
> >
> >
> >
> > I appreciate if someone can help me and give me glue on what I missed!
> >
> >
> >
> > Thanks in advance.
> >
> > Cheers
> >
> > Roland
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
-- Lee Meador
Sent from gmail. My real email address is [EMAIL PROTECTED]

Reply via email to