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

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



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
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 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

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.


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.

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.