Issue Details (XML | Word | Printable)

Key: MNG-2277
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Brian Fox
Reporter: Brett Porter
Votes: 13
Watchers: 13
Operations

If you were logged in you would be able to see more operations.
Maven 2 & 3

aggregating plugins in submodules of the reactor return all projects causing a chicken/egg issue

Created: 05/May/06 10:40 AM   Updated: 08/Mar/09 12:24 PM   Resolved: 28/Oct/07 08:28 PM
Return to search
Component/s: Plugin API, Plugins and Lifecycle, Reactor and workspace
Affects Version/s: 2.0.4
Fix Version/s: 2.0.8

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive maven-dependency-bug.zip (5 kB)

Issue Links:
Related
dependent
 

Complexity: Intermediate


 Description  « Hide

eg, assembly:attached

when this is put in maven-core, and a build is run from the root project with a clean repo, it fails, as the original project sorter doesn't consider the dependencies, building plugin-tools after maven-core.
However, hitting the aggregator when building maven-core then tries to resolve all of the projects as dependencies.



John Casey made changes - 22/Jun/06 12:37 PM
Field Original Value New Value
Fix Version/s 2.1 [ 11704 ]
Jason van Zyl made changes - 11/Jan/07 01:58 AM
Fix Version/s 2.1.x [ 13142 ]
Fix Version/s 2.1 [ 11704 ]
Brian Fox added a comment - 12/Jul/07 09:21 PM

I debugged another problem caused by enforcer:enforce-once (aggregator and requiresDependencyResolution) and confirm this. The resolveTransitively doesn't consider artifacts in the reactor.


Brian Fox made changes - 12/Jul/07 10:20 PM
Link This issue is depended upon by MENFORCER-11 [ MENFORCER-11 ]
Brian Fox made changes - 25/Jul/07 08:56 AM
Link This issue is depended upon by MJAVADOC-119 [ MJAVADOC-119 ]
Paul Gier made changes - 22/Oct/07 12:01 PM
Link This issue is depended upon by MRELEASE-285 [ MRELEASE-285 ]
Brian Fox made changes - 23/Oct/07 04:30 PM
Link This issue is depended upon by MRELEASE-285 [ MRELEASE-285 ]
Brian Fox made changes - 27/Oct/07 09:36 PM
Assignee Brian Fox [ brianfox ]
Brian Fox made changes - 28/Oct/07 08:27 PM
Link This issue relates to MNG-3260 [ MNG-3260 ]
Brian Fox added a comment - 28/Oct/07 08:28 PM

When a dependency can't be resolved AND the same is found in the reactor AND the plugin is an aggregator, we produce a large warning and then skip it. A clone of this issue has been created for possible further solution in 2.1: MNG-3260


Brian Fox made changes - 28/Oct/07 08:28 PM
Fix Version/s 2.1 [ 13142 ]
Resolution Fixed [ 1 ]
Fix Version/s 2.0.8 [ 13139 ]
Status Open [ 1 ] Closed [ 6 ]
Alfie Kirkpatrick added a comment - 29/Oct/07 04:39 PM

I checked out this evening from https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x (identifies itself as version 2.0.8-SNAPSHOT) and I'm still seeing an error when running mvn generate-sources on my simple test project where child1 depends on child2 (with single parent project that includes both child1 and child2).


Brian Fox added a comment - 29/Oct/07 05:38 PM

Alfie, can you attach your sample project?


Alfie Kirkpatrick added a comment - 30/Oct/07 04:26 AM

See attached. Running 'mvn generate-sources' returns an error, whereas running 'mvn package' completes successfully.

Best regards, Alfie.


Alfie Kirkpatrick made changes - 30/Oct/07 04:26 AM
Attachment maven-dependency-bug.zip [ 30252 ]
Brian Fox added a comment - 30/Oct/07 07:38 AM

What you are seeing is normal. The dependency doesn't exist so it's going to fail. MNG-2277 is about aggregating plugins that make it impossible to build the project from any phase because of the aggregation.


Alfie Kirkpatrick added a comment - 30/Oct/07 08:21 AM

Hi Brian, thanks for taking a look at the project. Maybe this isn't the right forum to discuss this now you've made it clear this is a different issue. However, I can't see how this is 'normal' behaviour because the dependency does exist in the reactor and targeting a later phase is successful. Also we only see the problem if a plugin is invoked by the build at an early phase and the plugin requires dependency resolution. At the moment our team is working around this issue by running 'mvn package eclipse:eclipse' which just seems crazy to me. If you need a fuller description of what we tried see my post on the mailing list (http://www.mail-archive.com/users@maven.apache.org/msg75053.html) where someone identified it (perhaps wrongly) as an instance of MNG-2277 – hence my interest in this issue. Many thanks, Alfie.


Brian Fox made changes - 12/Nov/07 03:45 PM
Link This issue relates to MNG-3283 [ MNG-3283 ]
Brett Porter made changes - 04/Mar/08 05:46 PM
Link This issue is related to MNG-3435 [ MNG-3435 ]
Martin Höller added a comment - 06/May/08 08:34 AM

Alfie, an issue for your problem exists in JIRA for maven-eclipse-plugin as MECLIPSE-380. Probably it's not just maven-eclipse-plugin related and should be moved to maven, I'm not sure.


Alfie Kirkpatrick added a comment - 06/May/08 09:23 AM

For info I had already raised MNG-3283 for the specific issue we're facing. I'll comment on MECLIPSE-380 now to link to it.


Benjamin Bentmann made changes - 08/Mar/09 12:24 PM
Link This issue relates to MNG-3023 [ MNG-3023 ]