简体   繁体   English

詹金斯为人工制品专家工作

[英]Jenkins job for artifactory maven

I am configuring a Jenkins build which can build and release artifacts to artifactory. 我正在配置一个Jenkins构建,该构建可以构建工件并将其发布到工件。 I have installed m3 artifcactory and added repo URL but not sure what steps I need to add more and do I need to make changes in POM.xml as well. 我已经安装了m3 artifcactory并添加了回购URL,但是不确定我需要添加什么步骤以及是否还需要在POM.xml中进行更改。 Can someone please guide me on this? 有人可以指导我吗?

I see in your comment that you have successfully installed your artifact to your local repository. 我在您的评论中看到您已成功将工件安装到本地存储库。 Next you need to deploy the artifact to your remote repository. 接下来,您需要将工件部署到远程存储库。 This is usually accomplished using the maven deploy plugin, documented here: https://maven.apache.org/plugins/maven-deploy-plugin/usage.html 这通常是通过使用Maven部署插件来完成的,请参见以下文档: https : //maven.apache.org/plugins/maven-deploy-plugin/usage.html

Note that you will need to add a distributionManagement section to your pom. 请注意,您将需要在您的pom中添加一个distributionManagement部分。 If your repository is secured, which it most likely is, you will need to add your credentials to your settings.xml in the server section. 如果您的存储库是安全的(很可能是安全的),则需要在服务器部分中将凭据添加到settings.xml中。 For this server section, you will need a username and password for your repository that has the appropriate upload privileges. 对于此服务器部分,您将需要具有适当的上传特权的存储库用户名和密码。 Your admin account should already have this privilege so you can use admin for your username if you like. 您的管理员帐户应该已经具有此特权,因此您可以根据需要使用admin作为用户名。

Have your Jenkins job execute "mvn clean deploy -DskipTests". 让您的Jenkins作业执行“ mvn clean deploy -DskipTests”。

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

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