Skip to content

2.1构建online-microservices

创建父项目liuchenyun-online-microservices

后端微服务

子项目

1_DeployToMaven

工程编译打包

1_1_DeployToOnlineMicroservices

父pom

VCS Root

https://gitee.com/liuchenyunol/MonkeyKing.git

Checkout Rules:
+:microservices/source-code/online-microservices => .

Build Step: Maven

Goals: clean deploy
Path to POM file: pom.xml

Maven Settings
Maven: auto
User settings selection: settings-with-ispeco-mirror-and-repo.xml

Artifact repository: Per agent

Triggers

Trigger a build on each check-in  勾选及以下

Use default value (60 seconds) // 选择默认60秒

Trigger rules: 
+:microservices/source-code/online-microservices/pom.xml

1_2_DeployToBaseModules

VCS Root

https://gitee.com/liuchenyunol/MonkeyKing.git

Checkout Rules:
+:microservices/source-code/online-microservices/base-modules => .

Build Step: Maven

Goals: clean deploy
Path to POM file: pom.xml

Maven Settings
Maven: auto
User settings selection: settings-with-ispeco-mirror-and-repo.xml

Artifact repository: maven default

Triggers

Trigger a build on each check-in  勾选及以下

Use default value (60 seconds) // 选择默认60秒

2_NVDAnalyst

依赖检测

3_SonarQube

sonar分析项目

4_Docker_latest

latest最新版本,用于测试环境

5_Docker_formal

用于生产的正式版本

配置maven私服

打父pom和base-modules需要maven私服 ,才能deploy。因为他们是自定义的组件jar,需要被微服务项目所引用

打包对jdk要求

选择jdk11,jdk17有问题

代码中有使用object.clone(),测试用例报错:
java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @1358b28e