简体   繁体   English

.m2没有使用最新的xmlbeans jar文件进行更新

[英].m2 is not getting updated with latest xmlbeans jar files

I do have a jenkins job that builds XML beans jar files from the internal gitlab project and puts it on the artifactory. 我确实有一个詹金斯工作,可以从内部gitlab项目构建XML bean jar文件,并将其放在工件上。 While having a build, this XML beans jar files are downloaded to the .m2 maven local repository. 进行构建时,此XML bean jar文件将下载到.m2 maven本地存储库。 However, if this jar file exists in the .m2 repository then maven does not bother to download it from the artifactory. 但是,如果此jar文件存在于.m2存储库中,则maven不会麻烦从工件中下载它。 With being said, if there is a gitlab change, it does build it and put it on the artifactory. 可以这么说,如果有gitlab更改,它将进行构建并将其放在工件上。 As there is already a jar file exist in .m2 repository, an old jar file is not being replaced with the new one. 由于.m2存储库中已经存在一个jar文件,因此旧的jar文件不会替换为新的jar文件。 We ended up a wrong dependency to the customer with a release. 我们最终发布了对客户的错误依赖。 The question is , What am I doing wrong here? 问题是,我在这里做错了什么?

mvn clean install -U

-U means maven will force update snapshot dependencies. -U表示maven将强制更新快照依赖项。 Release dependencies can't not be updated this way. 发行依赖关系无法通过这种方式进行更新。

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

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