简体   繁体   English

战争档案中的 Jar 文件具有旧的更改日期

[英]Jar files within a war archive have old changed date

After upgrading the version of dependencies inside the pom.xml file, the version of the jar files inside the lib folder is getting upgraded, but the "changed date" of these files is somewhat old.升级 pom.xml 文件中的依赖版本后,lib 文件夹中的 jar 文件的版本正在升级,但这些文件的“更改日期”有些旧。 In contrast, the war file was generated just moments before.相比之下,war 文件是在不久前生成的。 Any ideas why this is happening?任何想法为什么会发生这种情况? This is happening while the war file is generated on a date way ahead of this one当战争文件在此文件之前的某个日期生成时,就会发生这种情况

例子

Case 1: Lib A depend on foo-3.2.5.jar .案例 1:Lib A 依赖于foo-3.2.5.jar Your war depend on Lib A.您的战争取决于 Lib A。

Case 2: Your other project B what created on Jan 1st 2022, depend on foo-3.2.5.jar案例 2:您在 2022 年 1 月 1 日创建的其他项目 B,取决于foo-3.2.5.jar

Your WAR depend on foo-3.2.4.jar , then you upgrade to foo-3.2.5.jar (it was exist)您的 WAR 取决于foo-3.2.4.jar ,然后升级到foo-3.2.5.jar (它存在)

If you want see something brand new, delete all in .m2 directory.如果您想看到全新的内容,请删除.m2目录中的所有内容。 Clear maven cache https://www.baeldung.com/maven-clear-cache清除 maven 缓存https://www.baeldung.com/maven-clear-cache

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

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