Maven 1.x Jar Plugin

incorrect artifact relative path for inherited subproject pom

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.6
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

call to <artifact:install-snapshot> in
<goal name="jar:install-snapshot">
uses an relative path that the artifact plugin doest resolve correctly when inheritance or subprojects are involved and the "current" directory changes:
see line 448
http://cvs.apache.org/viewcvs.cgi/maven/src/plugins-build/artifact/src/main/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.java?view=annotate

I have resolved my problem by changeing the jar:install-snapshot goal with
------snip line 250 of plugin.jelly------------------
<!-- ================================================================== -->
<!-- I N S T A L L S N A P S H O T -->
<!-- ================================================================== -->
<goal
name="jar:install-snapshot" prereqs="jar:jar"
description="Install a snapshot jar in the local repository">
<maven:makeAbsolutePath path="${maven.build.dir}/${maven.final.name}.jar"
basedir="${basedir}"
var="realArtifactPath"/>
<ant:echo>jar path=${realArtifactPath}</ant:echo>
<ant:echo>basedir=${basedir}</ant:echo>
<!--artifact:install-snapshot
artifact="${maven.build.dir}/${maven.final.name}.jar"
type="jar"
project="${pom}"
/-->
<artifact:install-snapshot
artifact="${realArtifactPath}"
type="jar"
project="${pom}"
/>
</goal>
------end snip line 250 of plugin.jelly------------------

Activity

Hide
gax added a comment -

this bug also appies to goal name="jar:install"

is it better fixed my the artifact plugin?

Show
gax added a comment - this bug also appies to goal name="jar:install" is it better fixed my the artifact plugin?
Hide
Vincent Massol added a comment -

"Fix version" is to be used by the assignee

Show
Vincent Massol added a comment - "Fix version" is to be used by the assignee

People

  • Assignee:
    Unassigned
    Reporter:
    gax
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:

Time Tracking

Estimated:
1d
Original Estimate - 1 day
Remaining:
1d
Remaining Estimate - 1 day
Logged:
Not Specified
Time Spent - Not Specified