简体   繁体   English

maven命令行下载带时间戳的最新快照

[英]maven command line to download latest snapshot with timestamp

I tried using this: 我试过用这个:

mvn dependency:get -DrepoUrl=http://myserver/artifactory -Dartifact=com.mypackage:my-package-name:1.0.0

However it just downloaded the pom.xml in my artifactory i have my-package-name-1.0.0-20120328.121341-3.jar 然而它只是在我的神器中下载了pom.xml我有my-package-name-1.0.0-20120328.121341-3.jar

what i wish the command line to do is to download the snapshot with latest snapshot (without specifying the snapshot timestamp in the command line ofcourse). 我希望命令行做的是下载带有最新快照的快照(不在命令行中指定快照时间戳)。 can anyone let me know how to do it? 任何人都可以让我知道该怎么做?

thanks 谢谢

Append -SNAPSHOT to the version you specify. -SNAPSHOT附加到您指定的版本。

That is, you now request version 1.0.0 which is a release version, but the artifact you want is a unique snapshot. 也就是说,您现在请求版本1.0.0这是一个发行版本,但您想要的工件是一个独特的快照。 If you request version 1.0.0-SNAPSHOT , you're practically telling Maven that you want the latest snapshot version of 1.0.0 with no special preference. 如果你请求版本1.0.0-SNAPSHOT ,你实际上告诉Maven你想要1.0.0的最新快照版本没有特别的偏好。

Maven will resolve the artifact's Maven metadata from Artifactory and pick the latest snapshot file to download. Maven将从Artifactory解析工件的Maven元数据,并选择要下载的最新快照文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM