问题描述
我在詹金斯有一个大型的Maven项目.它由一个父项目和大约十二个本地项目组成.使用Jenkins,我可以执行mvn
deploy`,并使构建成功部署到我的Artifactory存储库中.
I have a large Maven project in Jenkins. It consists of a parent project, and about a dozen local projects. Using Jenkins, I am able to do mvn
deploy` and for the build to successfully deploy to my Artifactory repository.
但是,我似乎无法让Jenkin的Artifactory插件正常工作.
However, I can't seem to get the Jenkin's Artifactory plugin to work itself to work.
我在詹金斯(Jenkins)的Artifactory设置:
My Artifactory setting in Jenkins:
这是我们工作的设置:
推荐答案
在使用Jenkins Artifactory插件时,应执行mvn install
而不是mvn deploy
.这是因为该插件从Maven收集已发布的工件,并且直接执行mvn deploy
时,您会绕过它的行为.
When using the Jenkins Artifactory Plugin you should execute mvn install
instead of mvn deploy
.This is because the plugin collects the published artifacts from Maven and when executing mvn deploy
directly you are kind of by-passing it's behavior.
这篇关于使Artifactory插件与Jenkins和Maven一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!