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;