Maven 2 & 3

DistributionManagement properties don't get copied in cloned executionProject while lifecycle fork

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.2
  • Fix Version/s: 2.0.8
  • Component/s: Plugins and Lifecycle
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

Define a new Maven plugin with the goal described like this:

/**

  • @execute phase="deploy"
  • @goal deploy-custom
    */

When running 'mvn deploy-custom', deploy phase execution fails with 'Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated'.
It seems the problem raises from the fact that releaseArtifactRepository/snapshotArtifactRepository don't get copied in the cloned executionProject while lifecycle fork.

Activity

Hide
jan ancajas added a comment -

attached patch and unit test.

releaseArtifactRepository and snapshotArtifactRepository fields are not copied to the cloned MavenProject object when the project lifecycle is forked.

(thanks brett.

Show
jan ancajas added a comment - attached patch and unit test. releaseArtifactRepository and snapshotArtifactRepository fields are not copied to the cloned MavenProject object when the project lifecycle is forked. (thanks brett.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: