一、该问题的重现步骤是什么?
1. BladeX导入could工程正常,配置资源令牌和执行mvn clean package -U -Pdev -DskipTests正常
2. 新增2个微服务,carbon-customer和carbon-score,本地服务运行正常,执行正常
3.使用gitlab-ci自动化部署,执行
mvn clean install -Dmaven.compiler.fork=true -DskipTests
会报错,错误信息如四
二、你期待的结果是什么?实际看到的又是什么?
自动化部署时的命令mvn clean install -Dmaven.compiler.fork=true -DskipTests,能执行成功。
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
BladeX,<version>3.4.0.RELEASE</version>,masos(Intel)
四、请提供详细的错误堆栈信息,这很重要。
[INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 18, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 22, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-user-api:jar is missing. @ line 26, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-system-api:jar is missing. @ line 30, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-common:jar is missing. @ line 34, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-data-redis:jar is missing. @ line 38, column 21 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.wunsun:carbon-user-api:jar -> duplicate declaration of version (?) @ line 34, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 18, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 22, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-user-api:jar is missing. @ line 34, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-system-api:jar is missing. @ line 30, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-common:jar is missing. @ line 38, column 21 @ [ERROR] The build could not read 2 projects -> [Help 1] [ERROR] [ERROR] The project org.wunsun:carbon-customer:${revision} (/Users/lidongbin/code/java/wunsun/carbonws/carbon-service/carbon-customer/pom.xml) has 6 errors [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 18, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 22, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-user-api:jar is missing. @ line 26, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-system-api:jar is missing. @ line 30, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-common:jar is missing. @ line 34, column 21 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-data-redis:jar is missing. @ line 38, column 21 [ERROR] [ERROR] The project org.wunsun:carbon-score:${revision} (/Users/lidongbin/code/java/wunsun/carbonws/carbon-service/carbon-score/pom.xml) has 5 errors [ERROR] 'dependencies.dependency.version' for org.springblade:blade-core-boot:jar is missing. @ line 18, column 21 [ERROR] 'dependencies.dependency.version' for org.springblade:blade-starter-swagger:jar is missing. @ line 22, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-user-api:jar is missing. @ line 34, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-system-api:jar is missing. @ line 30, column 21 [ERROR] 'dependencies.dependency.version' for org.wunsun:carbon-common:jar is missing. @ line 38, column 21 [ERROR] [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. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
五、若有更多详细信息,请在下面提供。
1、carbon-service的pom.xml的配置如下:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.wunsun</groupId>
<artifactId>CarbonWs</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>carbon-service</artifactId>
<name>${project.artifactId}</name>
<packaging>pom</packaging>
<description>BladeX 微服务集合</description>
<modules>
<module>carbon-desk</module>
<module>carbon-system</module>
<module>carbon-customer</module>
<module>carbon-score</module>
</modules>
<dependencies>
<dependency>
<groupId>org.wunsun</groupId>
<artifactId>carbon-common</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-metrics</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-tenant</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-sharding</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-api-crypto</artifactId>
</dependency>
<dependency>
<groupId>org.wunsun</groupId>
<artifactId>carbon-dict-api</artifactId>
</dependency>
<dependency>
<groupId>org.wunsun</groupId>
<artifactId>carbon-scope-api</artifactId>
</dependency>
</dependencies>
</project>
2、carbon-customer微服务的pom.xml的配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wunsun</groupId>
<artifactId>carbon-service</artifactId>
<version>3.4.0.RELEASE</version>
</parent>
<artifactId>carbon-customer</artifactId>
<name>${project.artifactId}</name>
<version>${revision}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.wunsun</groupId>
<artifactId>carbon-user-api</artifactId>
</dependency>
<dependency>
<groupId>org.wunsun</groupId>
<artifactId>carbon-system-api</artifactId>
</dependency>
<dependency>
<groupId>org.wunsun</groupId>
<artifactId>carbon-common</artifactId>
打包的机器需要配置好maven,参考https://sns.bladex.cn/q-762.html
我已经配置过了。工程导入配置资源令牌没有问题的。
在未新增新的服务模块前,执行mvn clean install -Dmaven.compiler.fork=true -DskipTests是正常的,新增了微服务才又以上的错误,烦请看下
扫一扫访问 Blade技术社区 移动端