Maven 2.x and 3.x Deploy Plugin

"mvn -DaltDeploymentRepository=... deploy" of a SNAPSHOT doesn't replace date.buildnumber

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.3
  • Fix Version/s: 2.5
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

I 've checkouted a m2 project (spring-richclient) and deployed it to my local repo using the altDeploymentRepository parameter (from MDEPLOY-41).

But the checkout is a SNAPSHOT version and the deployer should replace it with something like spring-richclient-core-0.3.0-20070101.160450-2.jar
like the mvn deploy without altDeploymentRepository does,
but it doesn't:

[INFO] [deploy:deploy]
altDeploymentRepository = ggg-dev::default::scp://mvn.ggg.be/maven/maven2/dev
[INFO] Using alternate deployment repository ggg-dev::default::scp://mvn.ggg.be/maven/maven2/dev
[INFO] Retrieving previous build number from ggg-dev
Uploading: scp://mvn.ggg.be/maven/maven2/dev/org/springframework/richclient/spring-richclient-core/0.3.0-SNAPSHOT/spring-richclient-core-0.3.0-SNAPSHOT.jar
50K uploaded

Issue Links

Activity

Hide
Geoffrey De Smet added a comment -

One of the modules had NullPointerException in it, but according to WAGONSSH-49 that's an independend issue:

[INFO] Using alternate deployment repository ggg-dev::default::scp://mvn.ggg.be/maven/maven2/dev
[INFO] Retrieving previous build number from ggg-dev
Uploading: scp://mvn.ggg.be/maven/maven2/dev/org/springframework/richclient/spring-richclient/0.3.0-SNAPSHOT/spring-richclient-0.3.0-SNAPSHOT.pom
37K uploaded
Exception in thread "Exec thread mvn.ggg.be" java.lang.NullPointerException
at com.jcraft.jsch.ChannelSession.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)

Show
Geoffrey De Smet added a comment - One of the modules had NullPointerException in it, but according to WAGONSSH-49 that's an independend issue: [INFO] Using alternate deployment repository ggg-dev::default::scp://mvn.ggg.be/maven/maven2/dev [INFO] Retrieving previous build number from ggg-dev Uploading: scp://mvn.ggg.be/maven/maven2/dev/org/springframework/richclient/spring-richclient/0.3.0-SNAPSHOT/spring-richclient-0.3.0-SNAPSHOT.pom 37K uploaded Exception in thread "Exec thread mvn.ggg.be" java.lang.NullPointerException at com.jcraft.jsch.ChannelSession.run(Unknown Source) at java.lang.Thread.run(Thread.java:619)
Hide
Geoffrey De Smet added a comment -

Even setting -DupdateReleaseInfo=true doesn't help, try it yourself:

mvn deploy -DaltDeploymentRepository=ggg-deploy::default::file:///D:/tmp/delete/repo/ -DupdateReleaseInfo=true

Show
Geoffrey De Smet added a comment - Even setting -DupdateReleaseInfo=true doesn't help, try it yourself: mvn deploy -DaltDeploymentRepository=ggg-deploy::default::file:///D:/tmp/delete/repo/ -DupdateReleaseInfo=true
Hide
Geoffrey De Smet added a comment -

-DupdateReleaseInfo=true doesn't even seem to work on a normal:
mvn deploy -DupdateReleaseInfo=true
with pom
<repository>
<id>ggg-deploy</id>
<name>gggDeployment Repository</name>
<url>file:///D:/tmp/delete/deployrepo/</url>
</repository>
<snapshotRepository>
<id>ggg-dev</id>
<name>gggDevelopment Repository</name>
<url>file:///D:/tmp/delete/devrepo/</url>
</snapshotRepository>

if the version ends in -SNAPSHOT, as it creates
D:\tmp\delete\devrepo\org\springframework\richclient\spring-richclient\0.3.0-SNAPSHOT\spring-richclient-0.3.0-20070515.075943-1.pom
It should be:
...\deployrepo\.. instead of devrepo
and
not have SNAPSHOT in it's directory name.

Show
Geoffrey De Smet added a comment - -DupdateReleaseInfo=true doesn't even seem to work on a normal: mvn deploy -DupdateReleaseInfo=true with pom <repository> <id>ggg-deploy</id> <name>gggDeployment Repository</name> <url>file:///D:/tmp/delete/deployrepo/</url> </repository> <snapshotRepository> <id>ggg-dev</id> <name>gggDevelopment Repository</name> <url>file:///D:/tmp/delete/devrepo/</url> </snapshotRepository> if the version ends in -SNAPSHOT, as it creates D:\tmp\delete\devrepo\org\springframework\richclient\spring-richclient\0.3.0-SNAPSHOT\spring-richclient-0.3.0-20070515.075943-1.pom It should be: ...\deployrepo\.. instead of devrepo and not have SNAPSHOT in it's directory name.
Hide
Mikko Koponen added a comment -

Attaching a one-liner patch to fix this issue.

I ain't no maven expert, so I really don't know if there is a valid reason to not use unique versions for alt deployment repos for some reason. If so, I suppose the altDeploymentRepository syntax could be extended to allow this flag.

Show
Mikko Koponen added a comment - Attaching a one-liner patch to fix this issue. I ain't no maven expert, so I really don't know if there is a valid reason to not use unique versions for alt deployment repos for some reason. If so, I suppose the altDeploymentRepository syntax could be extended to allow this flag.
Hide
Maria Odea Ching added a comment -

This seems to be fixed in 2.5. Please verify so we can close this issue.

Show
Maria Odea Ching added a comment - This seems to be fixed in 2.5. Please verify so we can close this issue.
Hide
Stephen Connolly added a comment -

Marking as closed as the code contains the fix and this is also not an issue if using Maven 3 (as a side effect of Maven 3 dropping support for uniqueVersion=false)

Show
Stephen Connolly added a comment - Marking as closed as the code contains the fix and this is also not an issue if using Maven 3 (as a side effect of Maven 3 dropping support for uniqueVersion=false)

People

Vote (6)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: