我正在尝试将构建包从本地Nexus Repository Manager迁移到Azure Artifacts。我已经找到了这个Microsoft链接,该链接解释了如何使用Powershell脚本为NuGet(.NET包管理器)执行此操作,但是Maven没有此类工具。
I was thinking about retrieving all the build files with a "maven clean compile" and then pointing my pom.xml file to Azure Artifacts and then somehow push them. However, the amount of packages run into the 100k and there are many applications using it. So this feels like a very clunky way of going about it that will take a lot of effort and a lot of room for error.
Does anyone have any advice for me?
It turns out my issue mainly caused by my limited understanding of Artifact repos and the dependency chain of the project. Apparently it Artifact repos do caching of all the upstream repos so that's why there where 100k files in there. In the end there were only two company specific dependencies that needed moving.
我按照以下方式完成了迁移(适用于所有Maven迁移):
克隆链中最高的依赖项。(可能包含具有共同点或父母的名字)
如以下所述,将Azure Artifacts配置添加到$ {USER_HOME} /。m2 / settings.xml和pom.xml:https ://robeco.visualstudio.com/Delivery%20Integration%20Services/_packaging?_a=connect&feed=Maven-feed
从当前仓库中获取依赖项
mvn install
mvn package
创建一个发布版本(其后没有-SNAPSHOT)并将其推送到Azure Artifacts(否则,由于未发布依赖项错误,您将获得无法发布项目)
mvn release:clean
mvn release:prepare
mvn release:perform
现在您有了类似robeco-common-version1.0.16的构建。现在将其部署到Azure Artifacts
mvn deploy
您应该看到类似上载到Maven提要的内容:https : //robeco.pkgs.visualstudio.com/ ...。
对所有后续公司特定的依赖项执行相同的步骤。
嗨,朋友们,感谢您的分享,请将您的回复标记为答案,这将有助于其他社区成员更轻松地搜索此有用信息,只是提醒:)