简体   繁体   English

关联中的maven-metadata.xml文件未正确更新

[英]maven-metadata.xml file is not updating correctly in nexus

I have uploaded different versions of an artifact to nexus repository by programmatically using aether API . 我已经通过以编程方式使用ether API将工件的不同版本上传到了nexus存储库。 I 一世

But when I deleted an artifact from nexus remote repository, the maven-metadata.xml file is not updated correctly. 但是,当我从nexus远程存储库中删除工件时,maven-metadata.xml文件未正确更新。 The release version still points to the artifact that I have deleted. 发行版本仍然指向我已删除的工件。

Is there any way I can update the metadata file? 有什么办法可以更新元数据文件?

You can update the metadata on the repository manually in the UI, via a scheduled task or via the REST API. 您可以通过计划任务或REST API在UI中手动更新存储库中的元数据。 In general you have to keep in mind that the metadata files have to be managed by the client (eg Maven itself or your code..), and Nexus just offers features to fix the metadata as a help since some clients don't maintain the metadata correctly. 通常,您必须记住,元数据文件必须由客户端管理(例如Maven本身或您的代码。),并且Nexus只是提供了一些功能来修复元数据,因为有些客户端不维护该功能。元数据正确。

Eg in the UI. 例如在用户界面中。 Log in as administrator, go to Repositories, select the repo in the list, right click and press 'Rebuild metadata' 以管理员身份登录,转到存储库,在列表中选择存储库,右键单击并按“重建元数据”

If you want to do it only for a part of the repo you can go to the Browse Storage tab, drill down to the folder you want to update and do the same right click action. 如果您只想对部分仓库执行此操作,则可以转到“浏览存储”选项卡,向下钻取到要更新的文件夹,然后执行相同的右键单击操作。

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

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