为什么快照名称始终在其jar文件名中有日期?如何删除它 [英] Why the snapshot name always has date in its jar file name ? How to remove it
问题描述
当我部署jar时,maven总是在其文件名中添加日期,这使得文件名库与本地文件不同。如何删除文件名中的日期?
When I deploy jar, maven always add date in its file name, this make the file name repository different from the file in my local. How can I remove the date in file name ?
谢谢
推荐答案
关于为什么,这是因为它是一个SNAPSHOT软件包,每次部署它时,都是事实上部署它的新版本,所以添加时间戳来区分它们在远程存储库中。当Maven下载它时,它会删除时间戳,因为在本地存储库中只能有一个版本,所以如果不混淆,时间戳是无用的。
About why, it's because being it a SNAPSHOT package, each time you deploy it you are de-facto deploying a new version of it, so the timestamp is added to differentiate them in the remote repository. When Maven downloads it, it removes the timestamp because on your local repository there can only be one version, so the timestamp is useless if not confusing.
可以将其删除,以及如何解释: http:// maven。 apache.org/plugins-archives/maven-deploy-plugin-2.7/examples/disabling-timestamps-suffix.html
It can be removed, and how is explained here: http://maven.apache.org/plugins-archives/maven-deploy-plugin-2.7/examples/disabling-timestamps-suffix.html
但是,你不应该在乎关于工件名称,文件等。你正在使用maven,所以你不必关心他们。
However, you should NOT care about artifact names, files etc.. You are using maven SO THAT you don't have to care about them.
这篇关于为什么快照名称始终在其jar文件名中有日期?如何删除它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!