Maven 1.x Jar Plugin

Linking to ${pom.artifactId}-SNAPSHOT.jar generates an error on Solaris if a previous SNAPSHOT was deployed

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    JDK 1.4.2 for Maven
    Solaris 2.7 for the repository
  • Number of attachments :
    0

Description

The line in maven-jar-plugin-1.4/plugin.jelly that issues the site command to deploy the jar contains the following Unix command:

ln -sf ${maven.jar.to.deploy} ${pom.artifactId}-SNAPSHOT.jar;

This command generates an error on Solaris 2.7 when ${pom.artifactId}-SNAPSHOT.jar already exists. This situation occurs when you deploy a snapshot jar, then attempt to deploy it again, such as in:

maven jar:deploy-snapshot
maven jar:deploy-snapshot

The first time the snapshot was deployed, the link was created. The second time, the link still exists. Attempting to run the ln command the second time generates the error:

ln: cannot create common-SNAPSHOT.jar: File exists

The fix for this is to delete the link immediately before it is created by adding the following command before the ln command described above:

rm ${pom.artifactId}-SNAPSHOT.jar;

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
5m
Original Estimate - 5 minutes
Remaining:
5m
Remaining Estimate - 5 minutes
Logged:
Not Specified
Time Spent - Not Specified