You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "nicolas de loof (JIRA)" <ji...@codehaus.org> on 2008/03/28 11:38:58 UTC

[jira] Created: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Not beeing @aggregator, eclipse plugin does not require executedProject
-----------------------------------------------------------------------

                 Key: MECLIPSE-414
                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
             Project: Maven 2.x Eclipse Plugin
          Issue Type: Wish
    Affects Versions: 2.5
            Reporter: nicolas de loof
            Priority: Minor


The eclispe plugin uses both ${executedProject} and ${project}. 
Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().

Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Commented: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155948#action_155948 ] 

Barrie Treloar commented on MECLIPSE-414:
-----------------------------------------

After splattering in some debug code:

[ERROR] executedProject.getCompileSourceRoots=[D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\project-11\src\main\java, D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\project-11\target\generated-sources\modello]

[ERROR] project.getCompileSourceRoots=[D:\ide\maven\maven-eclipse-plugin\target\test-classes\projects\project-11\src\main\java]

So you can see that the executeProject has additional targets.

m-eclipse-p is not in a reactor and my limited understanding is that other plugins run prior to m-eclipse-p *contribute* to the current project.  So not sure why executedProject is being set and/or updated.

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Updated: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arnaud Heritier updated MECLIPSE-414:
-------------------------------------

         Assignee: Arnaud Heritier
    Fix Version/s: 2.5.2

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Wish
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Arnaud Heritier
>            Priority: Minor
>             Fix For: 2.5.2
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Commented: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155709#action_155709 ] 

Barrie Treloar commented on MECLIPSE-414:
-----------------------------------------

EclipsePluginIT.testProject11 now fails
as it is missing:

  <classpathentry kind="src" path="target/generated-sources/modello" including="**/*.java"/>

Not sure why moving from executedProject to project should remove generated sources from the project list.
There is a similar comment in  MECLIPSE-415 about this test.

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Commented: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155950#action_155950 ] 

Barrie Treloar commented on MECLIPSE-414:
-----------------------------------------

While this isn't @aggregator it *is* 
@execute phase="generate-resources"

which means a forked lifecycle and hence the use of executedProject

I'm looking into why it needs a forked lifecycle...

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Commented: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156068#action_156068 ] 

Barrie Treloar commented on MECLIPSE-414:
-----------------------------------------

Isn't that only if the CLI plugin isn't part of the normal lifecycle?

In this case m-eclipse-p is bound to the @phase generate-resources and therefore any other plugin that manipulates the pom should be visible?

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Updated: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arnaud Heritier updated MECLIPSE-414:
-------------------------------------

      Priority: Major  (was: Minor)
    Issue Type: Bug  (was: Wish)

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Arnaud Heritier
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Commented: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156178#action_156178 ] 

Benjamin Bentmann commented on MECLIPSE-414:
--------------------------------------------

bq. Isn't that only if the CLI plugin isn't part of the normal lifecycle? 
I don't fully get the meaning of those words. A plugin goal is either executed directly from the CLI, i.e. via "mvn <prefix>:<goal>", or indirectly from some lifecycle, i.e. via "mvn <phase>" in combination with an {{<execution>}} from the POM. That is to say, direct invocations from CLI are considered standalone goal executions and are never part of any lifecycle.

bq. In this case m-eclipse-p is bound to the @phase generate-resources
What case exactly do you refer to? In the plugin's source code, i.e. {{EclipsePlugin.java}}, I merely see {{@execute phase="generate-resources"}} which has an entirely different semantic than the similar looking {{@phase generate-resources}}. The first annotation requests a forked execution, while the second annotations defines a default phase if the goal is specified in an {{<execution>}} for which the user omitted the {{<phase>}} element.

I mean for the case of executing "mvn eclipse:eclipse", the eclipse goal is not bound to any lifecycle phase. No lifecycle phase, no other plugins unless the goal explicitly requests a forked lifecylce/goal execution. That is why the {{project}} variable does not see sources/resources that get dynamically created/registered by other goals during the lifecycle.

Maybe that simplified flow can shed some light on this:
# "mvn eclipse:eclipse" is invoked by user
# {{MavenProject}} instance is build from POM, call this instance A
# lifecycle phase "generate-resources" is forked as per the eclipse goal's {{@execute}} annotation
## {{MavenProject}} instance is build by cloning instance A, call this instance B
## the lifecycle bound plugins are called, where their parameter expression {{${project\}}} resolves to instance B, i.e. the plugins update instance B with generated sources/resources
# Finally, the eclipse goal itself is executed, where {{${project}}} is resolved with instance A and {{${executionProject}}} is resolved with instance B

If you like, have a look at {{DefaultLifecycleExecutor}} from the module maven-core, that's where most of this process is handled.

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Closed: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barrie Treloar closed MECLIPSE-414.
-----------------------------------

    Resolution: Not A Bug

As per Benjamin Bentmann's comments; the eclipse plugin being run from the CLI will never have access to other plugins unless run via @execute.

Therefore can't removed executedProject as this is the result of the forked lifecycle which contains the information we want.

Marking as not a bug.

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Work started: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Barrie Treloar (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on MECLIPSE-414 started by Barrie Treloar.

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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

        

[jira] Commented: (MECLIPSE-414) Not beeing @aggregator, eclipse plugin does not require executedProject

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MECLIPSE-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156014#action_156014 ] 

Benjamin Bentmann commented on MECLIPSE-414:
--------------------------------------------

bq. I'm looking into why it needs a forked lifecycle...
For goals that are primarily run from the CLI, there is not other way to tell about generated sources/resources. I.e. without forking a build up to "generates-resources", the plugin would only see the static source/directories specified in the POM and would miss stuff that gets dynamically generated.

> Not beeing @aggregator, eclipse plugin does not require executedProject
> -----------------------------------------------------------------------
>
>                 Key: MECLIPSE-414
>                 URL: http://jira.codehaus.org/browse/MECLIPSE-414
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: nicolas de loof
>            Assignee: Barrie Treloar
>             Fix For: 2.6
>
>
> The eclispe plugin uses both ${executedProject} and ${project}. 
> Not beeing an aggregator plugin, ${project} is allways tghe currently executed project, and the projectDirectory is project.getBasedir().
> Having two attributes for same target makes the plugin harder to understand

-- 
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