Jenkins部署SpringCloud微服务项⽬⼦模块Springboot单独部署⽅案
1. 微服务项⽬单独部署⼦模块过程中遇到的坑
不到服务模块
[ERROR] Could not find the selected project in the reactor: xxxServer @ [ERROR] Could not find the selected project in the reactor: xxxServer ->[Help 1]没有对应的依赖(私服中不到)
[ERROR] Failed to execute goal on project xxxServer: Could not resolve dependencies for project com.***:xxx1:jar:3.3: The following artifacts could not be r esolved: com.**:依赖的模块1:jar:3.3 in maven-zj (ip:port/repository/maven-public/)->[Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
查了很多⽅法,很多描述的都不够准确,也没能解决问题,主要问题是项⽬中maven打包命令配置错误
2. 在jenkins对应的Maven项⽬中配置配置如下
微服务在哪里// 说明:
// 1. Root POM : l ⽂件为项⽬【根⽬录】下的⽂件,⽽不是某个⼦模块
// 2. 打包命令如下:
package-pl ⼦模块⽂件夹/⼦模块名称-am -DskipTests
3. maven相关命令说明
参数全称释义说明
-pl–projects –projects Build specified reactor projects instead of
all projects
选项后可跟随{groupId}:{artifactId}或者所选模块的相
对路径(多个模块以逗号分隔)
-am–also-make If project list is specified, also build projects required
by the list
表⽰同时处理选定模块所依赖的模块
-amd –also-make-
dependents
If project list is specified, also build projects that
depend on projects on the list
表⽰同时处理依赖选定模块的模块
-N
–Non-
recursive
Build projects without recursive表⽰不递归⼦模块
-rf–resume-from Resume reactor from specified project表⽰从指定模块开始继续处理
-
DskipTests
跳过测试
参考:
wwwblogs/sandyflower/p/11600108.html blog.csdn/u011662047/article/details/85116163
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论