Maven 2 & 3

Resolve expressions in POM artifact coordinates

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.2.0
  • Component/s: POM
  • Labels:
    None
  • Complexity:
    Expert
  • Number of attachments :
    0

Description

See: http://docs.codehaus.org/display/MAVEN/Artifact-Coordinate+Expression+Transformation

See also: MNG-3057, MNG-4167

We need to resolve artifact coordinates in the POM, including project coordinate, dependencies, plugins, reports, etc. but NOT plugin configuration sections. These coordinates need to be resolved prior to plugins like GPG being executed, and prior to install/deploy steps, to ensure that signatures and derivatives (shade plugin output, for instance), along with installed and deployed copies, contain resolved values.

We attempted this for version expressions in 2.1.0, but this had several problems, including not being in place for plugin executions, and resolving version expressions within plugin configurations. When we tried to remedy this in 2.2.0, a bunch of more subtle issues sprang up, which are described in the link at the top of this description. In short, we can't really solve this adequately in 2.2.0 without performing major surgery, and even then I'm not sure it'd work. We need to consider this as a design requirement for Maven 3.x, where we can design it into the system instead of trying to retrofit...

Issue Links

Activity

Hide
John Casey added a comment -

MNG-4223 is the more recent issue related to this artifact-coordinate-expression feature. MNG-3057 introduced new code that caused other problems, and was removed in Maven 2.2.0 (See MNG-4167 for why).

Show
John Casey added a comment - MNG-4223 is the more recent issue related to this artifact-coordinate-expression feature. MNG-3057 introduced new code that caused other problems, and was removed in Maven 2.2.0 (See MNG-4167 for why).
Hide
John Casey added a comment - - edited

The removal of code related to MNG-3057, which was added in Maven 2.1.0, fixes MNG-4167. Removal of this code also reopens the discussion on expressions in POM artifact coordinates, but reverting this feature is intentional for Maven 2.2.0. This is because we need a more comprehensive look at the issues and use cases related to artifact-coordinate expressions, which will likely require some new design in Maven 3.x to accommodate them without causing inconsistencies for SCM files, plugins, or deployed POMs.

The issue used to track this redesign is MNG-4223.

Show
John Casey added a comment - - edited The removal of code related to MNG-3057, which was added in Maven 2.1.0, fixes MNG-4167. Removal of this code also reopens the discussion on expressions in POM artifact coordinates, but reverting this feature is intentional for Maven 2.2.0. This is because we need a more comprehensive look at the issues and use cases related to artifact-coordinate expressions, which will likely require some new design in Maven 3.x to accommodate them without causing inconsistencies for SCM files, plugins, or deployed POMs. The issue used to track this redesign is MNG-4223.
Hide
yodee added a comment -

Is there is any workaround to resolve this issue until we get 3.x with fix? I will be ok even if i can skip the POM installation somehow into repository.

Show
yodee added a comment - Is there is any workaround to resolve this issue until we get 3.x with fix? I will be ok even if i can skip the POM installation somehow into repository.

People

Vote (8)
Watch (16)

Dates

  • Created:
    Updated: