[ http://jira.codehaus.org/browse/MECLIPSE-94?page=comments#action_62802 ] 

Stephen Duncan Jr commented on MECLIPSE-94:
-------------------------------------------

As http://jira.codehaus.org/browse/MECLIPSE-19 was marked as a duplicate of 
this, I'll flesh out some details here.  

1) My request about JAR projects is apparently incorrect, and the addition of 
the wtpversion attribute solves the real issue which was a desire not to have 
WTP builders for jar projects

2) For POM projects, there are two current behaviors.  

a) When simply running eclipse:eclipse for a POM project, the project is 
skipped.  I think this is incorrect behavior, and should instead create a 
.project file for an Eclipse "Simple Project" with no builders, etc.  This is 
somewhat in contrast to the request here, as it sounds like Felipe wants to 
generate a Java Project.  That could still be effectively done with specifying 
builders or something, but it may be that a more convenient mechanism is needed.

b) when running eclipse:eclipse -Declipse.workspace=/path/to/workspace, a 
project for the POM packaged artifact IS created, and it IS a java project.  
Again, in that case, I would like it to be changed to be a Simple Project (no 
builders or natures).  That was what my original request was about.  

Feel free to separate this back out into separate requests or re-open 
MECLIPSE-19 if this clarification indicates that they are not really 
duplicates...

> Allow eclipse:eclipse to work on pom (and other) projects
> ---------------------------------------------------------
>
>          Key: MECLIPSE-94
>          URL: http://jira.codehaus.org/browse/MECLIPSE-94
>      Project: Maven 2.x Eclipse Plugin
>         Type: Improvement

>     Versions: 2.1
>     Reporter: Felipe Leme

>
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to