You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alfie Kirkpatrick (JIRA)" <ji...@codehaus.org> on 2007/11/12 22:07:25 UTC

[jira] Created: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Plugins that require dependency resolution in early phases cause dependency resolution issue
--------------------------------------------------------------------------------------------

                 Key: MNG-3283
                 URL: http://jira.codehaus.org/browse/MNG-3283
             Project: Maven 2
          Issue Type: Bug
          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
    Affects Versions: 2.0.7
            Reporter: Alfie Kirkpatrick
         Attachments: maven-dependency-bug.zip

What we're seeing is that some multi-project configurations succeed on
'mvn package' but fail on 'mvn generate-sources'. They are failing when
one project in the reactor references another project in the reactor
which is not installed in the local repo. It seems that the referenced
project has not quite "made it" into the reactor this early in the phase
lifecycle. But it does work correctly if you target a later phase at the
outset which is really confusing.

The problem only occurs when a plugin binds itself to the
generate-sources phase and has @requiresDependencyResolution, presumably
because this is what triggers resolution of the referenced dependency
too early in the lifecycle, and hence the error.

We are seeing this problem when trying to run 'mvn eclipse:eclipse'
because this only executes the generate-sources phase by default and we
have other mojos which genuinely do generate source, such as java2wsdl.

A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.

Attached is a really simple project that exhibits this problem.


-- 
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] Issue Comment Edited: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113589 ] 

Brian Fox edited comment on MNG-3283 at 11/12/07 3:45 PM:
----------------------------------------------------------

I think this is the same as MNG-2277, which is fixed in 2.0.8. I will post an RC build shortly and you can try it.


 was:
I think this is the same as MNG-2259, which is fixed in 2.0.8. I will post an RC build shortly and you can try it.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133703#action_133703 ] 

Brian Fox commented on MNG-3283:
--------------------------------

This kind of change will require rework that can only occur in 2.1, if at all.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Daniel Uribe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_126054 ] 

Daniel Uribe commented on MNG-3283:
-----------------------------------

Any new developments on this issue? It doesn't seem to be same issue as MNG-2277, and it is still not working on 2.0.8.

In the comments for that issue, Brian said that this is normal behavior. I would have to agree with Alfie that if a plugin is bound to a lower phase than the one specified in the @requiresDependencyResolution, it doesn't seem to make sense that it would try to resolve dependencies for a higher phase which hasn't even been executed. 

Elaborating on top of the example outlined by Alfie, if the project having the dependency uses the antrun plugin for the generate-sources phase, it specifies a @requiresDependencyResolution of test, which is definitely higher than the generate-resources used by the eclipse plugin. Since running the eclipse plugin will only execute phases below generate-resources, it will never reach the stage of creating the package (jar, war, etc) for the project that it has a dependency for, hence failing. 

Wouldn't it make sense to consider that when a plug-in is explicitly bound to a phase, to use that for dependency resolution?

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3283:
------------------------------

    Fix Version/s: 2.1

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: 2.1
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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] (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "William Ashley (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=286685#comment-286685 ] 

William Ashley edited comment on MNG-3283 at 12/22/11 3:19 PM:
---------------------------------------------------------------

I also just ran into this issue using maven 3.0.3 with some projects I recently split into modules.


                
      was (Author: washley):
    I also just ran into this issue using maven 3.0.3 with some projects I recently split into modules. The problem goal for me is findbugs:findbugs.
                  
> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205363#action_205363 ] 

Arnaud Heritier commented on MNG-3283:
--------------------------------------

Same issue with 3.0-alpha-6. I'll try to create a simple testcase but the issue is that maven, at the beginning of the build, downloads from my remote repo an update of each snapshot it will build.
My project is a multiproject which extends this pom : http://svn.exoplatform.org/projects/parent/tags/7/pom.xml (you'll see we are using the enforcer plugin)

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "JQ (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=142950#action_142950 ] 

JQ commented on MNG-3283:
-------------------------

We are experiencing this issue in relation to the enforcer plugin when trying to ensure that a reactor project is being built with JDK 1.4.x.  We are unable to do a mvn release:prepare, and the suggested mvn process-classes _______ workaround doesn't seem to benefit us.

Our project is arranged as:

jdk14/
 pom.xml (versions inside, compiler-plugin, enforcer-plugin)
 module1/
 module2/
 module3/
 ...

Trying to release:prepare from jdk14/ with the enforcer enabled gives us the unfortunate...

[WARNING] The dependency: blahblahblah:jar:1.2 can't be resolved but has been found in the reactor.
        This dependency has been excluded from the plugin execution. You should rerun this mojo after executing mvn install.

...messages, when all of the dependencies are there within the reactor.

Obviously this is a large issue for Eclipse users, but it also impacts other plugins and is a fairly serious problem in general.  If it's not something that can be fixed through configuration or a change of phase, it needs to be addressed (in other words, 'if at all' is mildly scary terminology to us).  Has there been any progress?

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: 2.1
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "brundibar (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284065#comment-284065 ] 

brundibar commented on MNG-3283:
--------------------------------

One year without progress?

h4.*Please this issue is MAJOR (if not BLOCKER), many people wait for it!*

Thanks,
Regards






> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

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

        

[jira] Commented: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Alfie Kirkpatrick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204993#action_204993 ] 

Alfie Kirkpatrick commented on MNG-3283:
----------------------------------------

Another comment... The only other workaround is to run 'mvn install' on your project. However, I have found working with teams that people can get in a real muddle when working with a mixture of 'dynamic' and local repository references. Therefore I try to encourage people to NEVER run mvn install on their project(s). This issue makes this nearly impossible.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205372#action_205372 ] 

Arnaud Heritier commented on MNG-3283:
--------------------------------------

For artifacts in general, I agree, but shouldn't we have a special behavior for poms ? 
In my case, I have a pom (reactor) and a module. 
I cleanup my local repo to not have those artifacts.
At the beginning of the build maven downloads the snapshot of the module pom instead of using it in the module directory. 
I tried to touch the module pom (in case of the nexus copy could be younger than my local copy) and I have the same result.
The new anno @requiresDependencyCollection will fix it, and i think it is the godd solution. But it will work only for maven 3. Thus as soon we'll use it our plugins will be compatible only with maven 3.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Emmanuel Potvin (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243327#action_243327 ] 

Emmanuel Potvin commented on MNG-3283:
--------------------------------------

Is there any news about this issue since january? I have this problem and I just try with Maven 3 and the @requiresDependencyCollection annotation and now instead of just crash I have warning telling me that some pom are missing and no dependency information is available. And effectively, the getArtifacts method returns me an empty collection.

What is wierd is that in my pom, I have dependencies on the other modules of my reactor and the version (in my case trunk-SNAPSHOT) is a property set inside the pom of the reactor, and it is resolved. So it is able to see my reactor's pom, but not use it to get pom inside other modules...

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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] (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Benson Margulies (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies updated MNG-3283:
----------------------------------

    Assignee:     (was: Brian Fox)
    
> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Carlo Sciolla (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301527#comment-301527 ] 

Carlo Sciolla commented on MNG-3283:
------------------------------------

@William Ashley same here
                
> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "William Ashley (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=286685#comment-286685 ] 

William Ashley edited comment on MNG-3283 at 12/22/11 3:56 PM:
---------------------------------------------------------------

I also just ran into this issue using maven 3.0.3 with some projects I recently split into modules.

Edit: I am experiencing this with the javadoc, findbugs, and dependency plugins. Compilation, tests, packaging all work, in addition to the codehaus cobertura plugin.
                
      was (Author: washley):
    I also just ran into this issue using maven 3.0.3 with some projects I recently split into modules.


                  
> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Alfie Kirkpatrick (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alfie Kirkpatrick reopened MNG-3283:
------------------------------------


Am pretty sure this is not fixed. In fact it seems to be worse in 2.1.0.

I downloaded my repro project (attached) and ran 'mvn generate-sources' using mvn 2.1.0. This gives the error. Whereas before 'mvn process-classes' would succeed this fails now too, which makes this workaround no longer viable. The earliest phase that works is 'mvn package'...

Thanks, Alfie.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Emmanuel Potvin (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249458#action_249458 ] 

Emmanuel Potvin commented on MNG-3283:
--------------------------------------

I tried with 3.0.1 and it is still not fixed. Am I alone with this problem???

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

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

Benjamin Bentmann commented on MNG-3283:
----------------------------------------

The constellation is just flawed: If a plugin has requiresDependencyResolution, i.e. asks for artifact files, and does so in phases like "validate", i.e. before even compilation occurs, how should Maven satisfies this requirement if not from the repo? The reactor is simply empty in terms of build output at this point of the build.

Plugins like the Enforcer which don't actually need the artifact files but only the dependency graph should be updated to use the new anno @requiresDependencyCollection (MNG-4331).

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Alfie Kirkpatrick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133693#action_133693 ] 

Alfie Kirkpatrick commented on MNG-3283:
----------------------------------------

Note that am pretty sure this issue is seen in m2eclipse which uses maven embedder from the 2.1.x version of maven. This issue may become more apparent as people start using these tools and probably harder to roll out fixes also...

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl closed MNG-3283.
------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.x)

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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] (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Adrián Boimvaser (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314195#comment-314195 ] 

Adrián Boimvaser commented on MNG-3283:
---------------------------------------

Still no progress on this issue?
                
> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "William Ashley (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=286685#comment-286685 ] 

William Ashley commented on MNG-3283:
-------------------------------------

I also just ran into this issue using maven 3.0.3 with some projects I recently split into modules. The problem goal for me is findbugs:findbugs.
                
> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: https://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>             Fix For: Issues to be reviewed for 3.x
>
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204995#action_204995 ] 

Jason van Zyl commented on MNG-3283:
------------------------------------

Can you try this with the 3.0-alpha-5? If it's broken we'll schedule for alpha-6 or alpha-7. Won't be fixed in 2.x.x. The reactor was pretty much rewritten in 3.x.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=204486#action_204486 ] 

Jason van Zyl commented on MNG-3283:
------------------------------------

Appears to be fixed, but not closed during the 2.0.8. Reopen if desired.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

-- 
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: (MNG-3283) Plugins that require dependency resolution in early phases cause dependency resolution issue

Posted by "Alfie Kirkpatrick (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205350#action_205350 ] 

Alfie Kirkpatrick commented on MNG-3283:
----------------------------------------

Same result in alpha-5. Both generate-sources and process-classes fail but package works. Sorry.

> Plugins that require dependency resolution in early phases cause dependency resolution issue
> --------------------------------------------------------------------------------------------
>
>                 Key: MNG-3283
>                 URL: http://jira.codehaus.org/browse/MNG-3283
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies, Plugins and Lifecycle, Reactor and workspace
>    Affects Versions: 2.0.7
>            Reporter: Alfie Kirkpatrick
>            Assignee: Brian Fox
>         Attachments: maven-dependency-bug.zip
>
>
> What we're seeing is that some multi-project configurations succeed on
> 'mvn package' but fail on 'mvn generate-sources'. They are failing when
> one project in the reactor references another project in the reactor
> which is not installed in the local repo. It seems that the referenced
> project has not quite "made it" into the reactor this early in the phase
> lifecycle. But it does work correctly if you target a later phase at the
> outset which is really confusing.
> The problem only occurs when a plugin binds itself to the
> generate-sources phase and has @requiresDependencyResolution, presumably
> because this is what triggers resolution of the referenced dependency
> too early in the lifecycle, and hence the error.
> We are seeing this problem when trying to run 'mvn eclipse:eclipse'
> because this only executes the generate-sources phase by default and we
> have other mojos which genuinely do generate source, such as java2wsdl.
> A workaround we're using is to run 'mvn process-classes eclipse:eclipse'.
> Attached is a really simple project that exhibits this problem.

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