maven - maven 多个模块 springbootr:boot 运行错误
问题描述
错误信息:
rc:common:jar:1.0 的 POM 丢失,没有可用的依赖信息
父 pom.xml
<modelVersion>4.0.0</modelVersion>
<groupId>rc</groupId>
<artifactId>springboot-multiple-maven-modules</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<modules>
<module>rest</module>
<module>common</module>
</modules>
休息 pom.xml
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>rc</groupId>
<artifactId>springboot-multiple-maven-modules</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>rest</artifactId>
<name>zeyo rest</name>
<!--<version>1.0</version>-->
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>rc</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
常见的 pom.xml
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>rc</groupId>
<artifactId>springboot-multiple-maven-modules</artifactId>
<version>1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>common</artifactId>
<name>common</name>
<version>1.0</version>
<packaging>jar</packaging>
一旦你有了一个名为 rc -> rest -> common 的依赖项。
为什么会这样?
解决方案
这只是说该common
项目尚未建成,我们开始了rest
。
首先在父项目上运行 maven 安装,这样“通用”项目也将被构建。
spring-boot:run : does not build the dependent jars.
希望这可以帮助。
推荐阅读
- graphics - OpenSceneGraph:绘制半透明对象时不要更新 z 缓冲区
- regex - 从文件名中过滤单词 | 正则表达式
- java - 如果我已经有了泛型的实现,如何声明接口方法
- excel - Excel 索引匹配
- elasticsearch - 在管道 Kibana 中排除“'”
- django-rest-framework - 如何在 Django CoreAPI 文档中显示嵌套对象字段
- image - 可变借用中的不可变借用
- r - R中几个big.matrix对象的元素平均值,na.rm = TRUE
- angular - 订阅方法多次调用Angular 5
- javascript - 最后一个功能被触发而不是第一个