You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "JQ (JIRA)" <ji...@codehaus.org> on 2008/07/24 02:26:27 UTC

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

    [ 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