Maven 程序集插件 - 在程序集中包含其他子依赖项
我在一位父母的领导下有四个孩子。其中一个子任务是构建一个包含其他 3 个模块 jar 的 zip。这有效,但它没有获取它们各自的依赖关系。
module-build pom.xml :
...
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<descriptors>
<descriptor>desc.xml</descriptor>
</descriptors>
</configuration>
</plugin>
...
desc.xml :
...
<moduleSets>
<moduleSet>
<binaries>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
...
未创建生成的“lib”文件夹。
任何帮助将不胜感激。
I have four child pom under one parent. One of the children is to build a zip containing the other 3 modules jars. This works but it doesn't pick up their respective dependencies.
module-build pom.xml :
...
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<descriptors>
<descriptor>desc.xml</descriptor>
</descriptors>
</configuration>
</plugin>
...
desc.xml :
...
<moduleSets>
<moduleSet>
<binaries>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
...
The resultant 'lib' folder is not created.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许有点晚了,但没关系:)。
您应该在父项目中移动程序集,但这不是真正的问题。
使用插件的版本:
这里是我的,功能齐全(但是是法语,请原谅我;))
这是插件的内置功能(用于获取依赖项)。但我永远不会在多模块项目中使用它,并且我知道使用 ob ModuleSet 存在一些棘手的考虑...
希望这会有所帮助...
Maybe it's a bit late, but no matter :).
You should move your assembly at parent project, but that's not the real problem.
Using version of the plugin :
Here mine, wich is totally functional (but in French, forgive me ;))
This is a built-in feature of the plugin (to get dependencies). But I'd never use it from a multimodule project, and I know that there is some tricky consideration with the use ob ModuleSet ...
Hope that will help...
您是否已将其他 3 个模块指定为该第四个模块的依赖项(位于父级的模块部分中)?
如果你这样做,即使你这样做也应该有效:
Do you have specified the other 3 modules as a dependency of this 4th module, next to being in the modules section of the parent?
If you do, it should work even if you do this: