【发布时间】:2021-11-09 14:38:19
【问题描述】:
在父 pom 中,我声明了模块。
`
<module>module1</module>
<module>module2</module>
<module>module3</module>
`
在每个子项目 pom 中,我都声明了父项
`
<groupId>com.group</groupId>
<artifactId>parent-module</artifactId>
<version>---</version>
`
在父pom中,由于项目相关的限制,我选择跳过父pom的部署
父pom: `
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
`
这意味着我在部署时只有三组 Jar 和 Pom。
- childJar1
- childPom1
- childJar2
- childPom2
- childJar3
- childPom3
但是,当我使用上面的任何一个jar时,我在使用过程中都会遇到错误,因为每个pom都声明了父模块并且父模块不存在(因为我选择跳过父模块的部署)。
有什么办法可以让每个子模块不声明或查找父模块?
【问题讨论】:
-
在你的仓库中部署父节点有什么问题?您要解决的问题是什么?
-
老板说可交付成果应该“完全”像 gradle 可交付成果,因此没有父模块。我不知道该怎么做,老实说,我认为这有点牵强
-
必须是子模块?
标签: java maven maven-3 maven-plugin maven-deploy-plugin