Maven 2 & 3

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

Details

  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

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.

Issue Links

Activity

Hide
Brian Fox added a comment -

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

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

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

Show
Brian Fox added a comment - 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
Hide
Alfie Kirkpatrick added a comment -

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

Show
Alfie Kirkpatrick added a comment - 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).
Hide
Brian Fox added a comment -

Alfie, can you attach your sample project?

Show
Brian Fox added a comment - Alfie, can you attach your sample project?
Hide
Alfie Kirkpatrick added a comment -

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

Best regards, Alfie.

Show
Alfie Kirkpatrick added a comment - See attached. Running 'mvn generate-sources' returns an error, whereas running 'mvn package' completes successfully. Best regards, Alfie.
Hide
Brian Fox added a comment -

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.

Show
Brian Fox added a comment - 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.
Hide
Alfie Kirkpatrick added a comment -

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.

Show
Alfie Kirkpatrick added a comment - 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.
Hide
Martin Höller added a comment -

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.

Show
Martin Höller added a comment - 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.
Hide
Alfie Kirkpatrick added a comment -

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.

Show
Alfie Kirkpatrick added a comment - 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.

People

Vote (13)
Watch (13)

Dates

  • Created:
    Updated:
    Resolved: