You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mauro Botelho <ma...@gmail.com> on 2005/10/10 00:41:29 UTC

Single Eclipse Project with whole m2 code base

Does anybody have an easy way of creating a single eclipse project for
the whole m2 code base?

Looking at the source code for the eclipse plug in, it looks like it 
would do something like that in reactor mode, but when I do m2 
eclipse:eclipse in the top level directory, I get multiple projects 
created, but not the one that I was looking for. If I do the same with 
the -r switch, I get the following error message:

[INFO] Scanning for projects...
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] Diagnosis: Failed to resolve artifact.

Unable to download the artifact from any repository
   org.apache.maven:maven:2.0-beta-1-SNAPSHOT:pom

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

Root Cause: Unable to download the artifact from any repository

[INFO] 
----------------------------------------------------------------------------
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Oct 09 18:40:57 EDT 2005
[INFO] Final Memory: 1M/17M
[INFO] 
----------------------------------------------------------------------------


Mauro


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


Re: Single Eclipse Project with whole m2 code base

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Mauro Botelho wrote:
> The eclipse plug in seems to check if it is running in reactor mode, and 
> if it is it will then accumulate sources and artifacts/dependencies to 
> generate a single project.

Well it apparently generates 1 eclipse project for 1 m2 project in 
non-reactor mode. I'd be much surprised if it generated 1 for many in 
reactor mode. Even if such alternative mode operation was supported it 
should not be triggered by -r switch.

> What I expected was that it would read the modules section of the pom 
> and then create a single project with all of them.
> 
> Does it make sense?

IMO 1-to-1 mapping makes more sense from eclipse user's perspective.

> P.S.: Should I move this thread to the users mailing list?

Probably a good idea,

have a good day,
Rafal

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


Re: Single Eclipse Project with whole m2 code base

Posted by Mauro Botelho <ma...@gmail.com>.
The eclipse plug in seems to check if it is running in reactor mode, and 
if it is it will then accumulate sources and artifacts/dependencies to 
generate a single project.

What I expected was that it would read the modules section of the pom 
and then create a single project with all of them.

Does it make sense?

Mauro

P.S.: Should I move this thread to the users mailing list?


Brett Porter wrote:
> Sorry, I don't understand your question here?
> 
> Mauro Botelho wrote:
> 
> 
>>It makes sense, but in what cases would that code be activated then?
>>
>>Mauro
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>For additional commands, e-mail: dev-help@maven.apache.org
>>


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


Re: Single Eclipse Project with whole m2 code base

Posted by Brett Porter <br...@apache.org>.
Sorry, I don't understand your question here?

Mauro Botelho wrote:

> It makes sense, but in what cases would that code be activated then?
>
> Mauro
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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


Re: Single Eclipse Project with whole m2 code base

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Mauro Botelho wrote:
> It makes sense, but in what cases would that code be activated then?

If you run m2 eclipse in the top level directory it will successfully 
generate project descriptors in level 1 subdirectories that contain Java 
  (jar) projects. These can be imported into an eclipse workspace 
(should be in different physical location that the checked code) using 
"Import existings projects into workspace".

You can go into maven-plugins and run m2 eclipse in there, and import 
the additional projects into the workspace. Unfortunately they will not 
be cross linked in eclipse with core projects generated in the previous 
run (they'll depend on jars in the repo, instead of eclipse projects)

m2 -r eclipse does not work because drills down the whole source tree 
for poms and it picks up one that is unbuildable. This might be an 
error, but not necessarily - the tests can contain unbuildable poms 
quite legitimately.

R.

PS. hope my expalinations are useful - I'm just feeling my way around 
too ;-)

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


Re: Single Eclipse Project with whole m2 code base

Posted by Mauro Botelho <ma...@gmail.com>.
It makes sense, but in what cases would that code be activated then?

Mauro


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


Re: Single Eclipse Project with whole m2 code base

Posted by Brett Porter <br...@apache.org>.
No, you can't create a single eclipse project for all the sources. They
produce multiple jars.

- Brett

Mauro Botelho wrote:

> Does anybody have an easy way of creating a single eclipse project for
> the whole m2 code base?
>
> Looking at the source code for the eclipse plug in, it looks like it
> would do something like that in reactor mode, but when I do m2
> eclipse:eclipse in the top level directory, I get multiple projects
> created, but not the one that I was looking for. If I do the same with
> the -r switch, I get the following error message:
>
> [INFO] Scanning for projects...
> [INFO]
> ----------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Diagnosis: Failed to resolve artifact.
>
> Unable to download the artifact from any repository
>   org.apache.maven:maven:2.0-beta-1-SNAPSHOT:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
>
> Root Cause: Unable to download the artifact from any repository
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO]
> ----------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sun Oct 09 18:40:57 EDT 2005
> [INFO] Final Memory: 1M/17M
> [INFO]
> ----------------------------------------------------------------------------
>
>
>
> Mauro
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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