jenkins上传External jar到nexus仓库
发布日期:2021-10-09 15:34:59
浏览次数:1
分类:技术文章
本文共 1680 字,大约阅读时间需要 5 分钟。
使用jenkins的nexus Artifact Uploader plugin
stage('upload the jar to nexus') { nexusArtifactUploader nexusVersion: 'nexus2', protocol: 'http', nexusUrl: 'localhost:8080/nexus', groupId: 'sp.sd', version: '2.4', repository: 'NexusArtifactUploader', credentialsId: '44620c50-1589-4617-a677-7563985e46e1', artifacts: [ [artifactId: 'nexus-artifact-uploader', type: 'jar', classifier: 'debug', file: 'nexus-artifact-uploader.jar' ] ]
2.使用maven的deploy插件
node{ stage ('Build') { git url: 'https://github.com/cyrille-leclerc/multi-module-maven-project' withMaven( // Maven installation declared in the Jenkins "Global Tool Configuration" maven: 'maven-3', // Maven settings.xml file defined with the Jenkins Config File Provider Plugin // We recommend to define Maven settings.xml globally at the folder level using // navigating to the folder configuration in the section "Pipeline Maven Configuration / Override global Maven configuration" // or globally to the entire master navigating to "Manage Jenkins / Global Tools Configuration" mavenSettingsConfig: 'my-maven-settings') { // Run the maven build sh "mvn deploy:deploy-file -DgroupId=\ -DartifactId=nexus-artifact-uploader \ -Dversion=1.0.0 \ -Dpackaging=jar \ -Dfile=nexus-artifact-uploader.jar \ -DrepositoryId=releases \ -Durl=http://localhost:8080/nexus" } // withMaven will discover the generated Maven artifacts, JUnit Surefire & FailSafe & FindBugs & SpotBugs reports... }}
转载地址:https://blog.csdn.net/qinwuxian19891211/article/details/105932995 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
关注你微信了!
[***.104.42.241]2024年04月10日 01时35分15秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
【Java设计者模式】-Java实现订阅-发布者模式
2019-04-26
【计算机操作系统】-什么是系统调用呢?什么是用户态?什么是内核态?
2019-04-26
【计算机操作系统-进程管理】-进程通信是什么呢?
2019-04-26
Python程序元素分析
2019-04-26
TurtleArt美景图
2019-04-26
margin布局
2019-04-26
盒模型之border实践--三角形
2019-04-26
块状元素与内敛元素
2019-04-26
CSS控制段落和文字属性和背景
2019-04-26
Python语言开发工具
2019-04-26
Requests库的入门
2019-04-26
Robots协议
2019-04-26
Python网络爬虫的网站实例
2019-04-26
HTML学习思维导图
2019-04-26
h标签与p标签
2019-04-26
BeautifulSoup库的安装及基本元素
2019-04-26
基于bs4的HTML内容遍历方法
2019-04-26
信息标记与信息提取
2019-04-26
各大网站CSS初始化代码
2019-04-26
正则表达式的基本用法
2019-04-26