我有一个多模块Maven项目中,我有多个微服务模块,所以我在我的父母pom.xml
列出像下面的模块:詹金斯构建失败,多模块Maven项目
<modules>
<module>core</module>
<module>model-base</module>
<module>module1</module>
<module>module2</module>
...
<module>module5</module>
<module>module7</module>
<module>module6</module>
</modules>
这里module7
是依赖于module5, 6
所以我已经上市的依赖像下面我module7
pom.xml
:
<parent>
<artifactId>pojectA</artifactId>
<groupId>com.domain</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>module7</artifactId>
<dependencies>
<dependency>
<groupId>com.domain</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.domain</groupId>
<artifactId>module5</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.domain</groupId>
<artifactId>module6</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
当我在当地的运行mvn clean package
如预期的那样module7
之前调用0,但在詹金斯它正在努力建立module 5
然后module7
决策构建失败,他说:
[ERROR] Failed to execute goal on project module7: Could not resolve dependencies for project module7:jar:1.0-SNAPSHOT: Could not find artifact module6:jar:1.0-SNAPSHOT -> [Help 1]
我是否需要运行任何其他作业或在我pom.xml
重新排序模块,怎么它与詹金斯的本地区别?感谢任何帮助。
你确定詹金斯真的和你在本地构建的一样吗?这是构建控制台输出中唯一的错误吗?您能否从控制台输出中提供_Reactor Build Order_和_Reactor Summary_部分? –
你有没有看到反应堆是根据你的依赖?原因module5,module6必须在module7之前建立? – khmarbaise