maven package 打包失败,web模块引入common模块的jar包,报错找不到jar包

王静0716 发布于 2017/08/05 16:34
阅读 1K+
收藏 0

分模块工程:

xx-parent是父工程,包含pom.xml

xx-common包含pojo/dao/mapper,会打包成jar

xx-web包含Controller、service,打包成war,提供接口。

现在我打包xx-web,需引入common的jar包,可是报错。
[ERROR] Failed to execute goal on project DIA-web: Could not resolve dependencies for project com.wj.dia:DIA-web:war:1.0-SNAPSHOT: Could not find artifact com.wj.dia:DIA-common🏺1.0-SNAPSHOT -> [Help 1]
[ERROR] 

加载中
0
王静0716
王静0716

common模块  mvn install

0
王静0716
王静0716


[ERROR] Failed to execute goal on project DIA-web: Could not resolve dependencies for project com.weiqitong.dia:DIA-web:war:1.0-SNAPSHOT: Failed to collect dependencies at com.weiqitong.dia:DIA-common:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for com.weiqitong.dia:DIA-common:jar:1.0-SNAPSHOT: Could not find artifact com.weiqitong.dia:DIA-parent:pom:1.0-SNAPSHOT -> [Help 1]
[ERROR] 

0
王静0716
王静0716

parent 模块 install

0
路小磊
路小磊

com.weiqitong.dia:DIA-parent 这个找不到,需要先install

王静0716
王静0716
恩恩 解决了
0
卒子A
卒子A
parent一般package是site,也要maven
0
卒子A
卒子A
也要maven install。 按依赖顺序,一个个install。
返回顶部
顶部