maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Coy (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MECLIPSE-94) Allow eclipse:eclipse to work on pom (and other) projects
Date Tue, 18 Jul 2006 04:02:27 GMT
    [ http://jira.codehaus.org/browse/MECLIPSE-94?page=comments#action_70031 ] 
            
Stephen Coy commented on MECLIPSE-94:
-------------------------------------

I don't think Kenny's remarks are quite right regarding the use of 'pom' projects.

There's at least a couple of scenarios where 'pom' projects are used where the generated artifact
is not one of the traditional java archives.

1) Ch 6 of the bbwm book uses a pom project for a user guide module where the generated artifact
is a web site.

2) The assembly plugin seems to require that the project type be 'pom' when the primary artifact
of the module is an assembly.

I think it's quite reasonable for the eclipse plugin to generate a 'simple' .project for this
kind of module.

The fact that we have to set the project type to 'pom' in these cases seems to be semantically
wrong at least, but that is what we have to live with at present.


> 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
>          Issue Type: Improvement
>    Affects 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

        

Mime
View raw message