jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x Multi-Project Plugin
  • MPMULTIPROJECT-16

multiproject:site fails in multiproject:site-init when projects are interdependent

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    all

Description

The multiproject:site goal calls multiproject:site-init to initialize the list of projects included in the current multiproject configuration, to keep from having to repeatedly assemble this collection. It uses the reactor to handle this, running it without any specified goal, merely to collect the project list.

The trouble arises when any project within that set depends on another project within the set, and none of the project jars have been installed and/or deployed yet. In this case, when reactor tries to run, it attempts to resolve all dependencies for each project it includes, even if it's not actually running any goals on these projects. Obviously, in this case the projects' dependencies cannot be completely resolved, and the build fails. Dependency resolution is an unnecessary step for the intent of the multiproject:site-init goal, and therefore should not be a limiting factor during the goal's execution.

Therefore, I propose the following: modify the reactor tag to include two more attributes. These should be collectOnly and collectionVar. The first will allow the reactor to avoid execution of the project goals (default or otherwise) when the intent is merely to collect a set of projects. The second allows us to have control over the name of the project collection within the context, instead of trusting that the name "reactorProjects" will never change.

Once this is accomplished, we will need to modify the multiproject:site-init's invocation of the reactor tag to look like:

<maven:reactor
basedir="${maven.multiproject.basedir}"
banner="Gathering project list"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="true"
ignoreFailures="${maven.multiproject.ignoreFailures}"
collectOnly="true"
collectionVar="reactorProject"
/>

This will accomplish two important goals. First, we will not be dependent upon a side effect of the reator's execution (the binding of "reactorProjects" within the context), and second we will not be forced to resolve the projects included in the reactor's scope if all we want to do is collect the project set for later use.

I am attaching a patch to this issue to handle the multiproject modifications for this task, and will post an associated issue in the maven project to accomplish the modifications to the reactor tag. The maven issue id will be documented later.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    multiproject-gather-dependency-defer-fix.patch
    14/Dec/03 6:09 PM
    0.8 kB
    John Casey

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. MAVEN-1082 improve reactor tag to allow collection of included projects without execution

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
John Casey added a comment - 14/Dec/03 6:09 PM

patch as promised.

Show
John Casey added a comment - 14/Dec/03 6:09 PM patch as promised.
Hide
Permalink
John Casey added a comment - 14/Dec/03 6:20 PM

accompanying maven JIRA issue is MAVEN-1082.

Show
John Casey added a comment - 14/Dec/03 6:20 PM accompanying maven JIRA issue is MAVEN-1082.
Hide
Permalink
Lukas Theussl added a comment - 22/Nov/05 1:06 AM

Fixed a long time ago

Show
Lukas Theussl added a comment - 22/Nov/05 1:06 AM Fixed a long time ago

People

  • Assignee:
    Unassigned
    Reporter:
    John Casey
Vote (0)
Watch (1)

Dates

  • Created:
    14/Dec/03 6:05 PM
    Updated:
    22/Nov/05 1:06 AM
    Resolved:
    22/Nov/05 1:06 AM

Time Tracking

Estimated:
1h
Original Estimate - 1 hour
Remaining:
1h
Remaining Estimate - 1 hour
Logged:
Not Specified
Time Spent - Not Specified
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.