[英]IntelliJ/Maven not updating artifacts from Artifactory
I recently set up a password protected Artifactory server. 我最近设置了一个受密码保护的Artifactory服务器。 A Jenkins server is deploying my artifacts to a maven repository on that Artifactory server.
Jenkins服务器正在将我的工件部署到该Artifactory服务器上的maven存储库。
Here is the problem: 这是问题所在:
The new builds are nor available at runtime (in IntelliJ) neither in Maven (when building). 新版本在运行时(在IntelliJ中)也不可用于Maven(构建时)。 To get maven to update, I've to delete the artifacts from my local repo.
为了让maven更新,我将从我的本地仓库删除工件。
How can I tell Maven/IntelliJ to always check for the newest version? 如何告诉Maven / IntelliJ始终检查最新版本?
Even that wasn't doing anything: 即便这样做也没有:
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
There are the cases to deal with: 有案件需要处理:
~/.m2/
repository cache for Maven or remote repository cache for Artifactory). ~/.m2/
存储库缓存或Artifactory的远程存储库缓存),则Maven和Artifactory将永远不会检查更新的二进制文件。 The only way to force Artifactory and Maven to re-fetch a release artifact is to delete it from the cache . -SNAPSHOT
and thus they violate the rule I just wrote, so don't use them), their retrieval policy is the same: Maven consider them expirable resources , it will occasionally check for a new blob, posted under the same version. -SNAPSHOT
,因此它们违反我刚写的规则,因此不使用它们)之间存在差异,但它们的检索策略是相同的: Maven认为它们是可过期的资源 ,它偶尔会检查一个新的blob,在同一个版本下发布。 Artifactory does the same: occasionally the expirable resource is declared "expired", so next time Maven asks for this resource, Artifactory will fetch to the remote repository to check for a new blob, posted under the same version. <update-policy/>
controls how often Maven checks for new snpashots, and the --update-snapshots
flag forces Maven to check immediately. <update-policy/>
控制Maven检查新snpashot的频率,而--update-snapshots
标志强制Maven立即检查。 Retrieval Cache Period
parameter in remote repository configuration controls how often Artifactory checks for new snapshots, and the Zap Caches
action on the remote repository in the artifact browser screen makes sure that Artifactory will check for new snapshots on the next request. Retrieval Cache Period
参数控制Artifactory检查新快照的频率,以及工件浏览器屏幕中远程存储库上的Zap Caches
操作,确保Artifactory将在下一个请求中检查新快照。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.