Jenkins中的配置Maven设置 [英] Config maven setting in Jenkins

查看:292
本文介绍了Jenkins中的配置Maven设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目有3个maven模块,它们是由nodejs脚本构建的.

My project has 3 maven module and they are built by nodejs script.

现在,我想与Jenkin和Nexus集成.我的Jenkin构建配置如下所示:

Now I want to integrate with Jenkin and Nexus. My Jenkin build config look like this:

我还在 Build 部分的提供配置文件构建步骤中添加了我的Maven settings.xml . Maven仍然失败,无法解析我的Nexus存储库中的依赖项.

I also add my maven settings.xml in Provide configuration files build step in Build section but it didn't work. Maven still fail and could not resolve dependencies in my Nexus repo.

在我的本地Maven settings.xml中,我为Nexus存储库和另一个存储库添加了一些配置.

In my local maven settings.xml I have added some config for Nexus repository and another repository.

您能启发我这种情况吗?我是詹金的新手.

Can you enlight me this case. I'm new to Jenkin.

谢谢.

推荐答案

我只是找到一种解决方法,方法是将mvn-settings.xml直接添加到我的文件夹中,然后编辑运行命令,例如:

I just find a way to work around by adding mvn-settings.xml directly to my folder and edit the run command like:

mvn clean install -s mvn-settings.xml

这篇关于Jenkins中的配置Maven设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆