[ 
https://jira.codehaus.org/browse/MECLIPSE-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279560#comment-279560
 ] 

Barrie Treloar commented on MECLIPSE-94:
----------------------------------------

Your root project should not be a java project.

Generally the structure I use is:
root
- module 1
- module N

Checkout project from version control.

Run mvn eclipse:eclipse at the root.

Refresh project.

In Eclipse Navigator delete .project file, then File > Import... > Browse to 
root and click ok.
All your projects should appear, select them, Ok.

You are now ready to start working.

Having your root project be complicated is asking for trouble, and Maven only 
allows module aggregation via packaging type of pom anyway.



> Allow eclipse:eclipse to work on pom (and other) projects
> ---------------------------------------------------------
>
>                 Key: MECLIPSE-94
>                 URL: https://jira.codehaus.org/browse/MECLIPSE-94
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.1
>            Reporter: Felipe Leme
>         Attachments: MECLIPSE-94.patch
>
>
> I'm creating a Java EE project based on the m2book (which I was reviewing; 
> it's not available yet...) and one of the projects is a pom-packaging project 
> used for integration tests. According to Vincent, currently this project must 
> be a pom (in fact, I tried to set it as jar, but then the test phase would be 
> run anyway, which would cause the tests to fail), as it doesn't produces a 
> jar. But as it has java files (on the src/main/it/java directory), I tried to 
> call eclipse:eclipse but it fails, saying that "Not running eclipse plugin 
> goal for pom project".
> For these scenarios, I think a propery would be enough. At first I thought 
> something about a 'force' or 'forceGeneration' property, would enough, which 
> the code change being from:
>  if ( "pom".equals( packaging ) && eclipseProjectDir == null ) 
> to:
>  if (  "pom".equals( packaging ) && eclipseProjectDir == null && 
> !forceGeneration ) 
> Then I realized there is other place where the pom nature is checked:
>  if (  "pom".equals( packaging ) && eclipseProjectDir == null && 
> !forceGeneration ) 
> So, I think a better name for the property would be 'javaProject' and the 
> change would be:
> final boolean isJavaProjectProperty = // read property; defaults to false...
>  if (  "pom".equals( packaging ) && eclipseProjectDir == null && 
> !isJavaProjectProperty ) 
> isJavaProject = isJavaProjectProperty || !"ear".equals( packaging ) && 
> !"pom".equals( packaging );
> If nobody objects and someone is willing to apply the changes, I can provide 
> such patch (with the proper test cases).
> -- Felipe
> PS: I'm assigning it to Vincent for now, as he 'dreamed' that such features 
> already existed :-)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to