我正在尝试使用maven程序集插件生成一个zip文件程序集。我只剩下两个问题,我想知道是否可以通过配置来解决,但作为最后的手段,我也在考虑编写我自己的maven插件,它扩展了maven程序集插件。
这两个缺失的部分是
outputDirectory**.*将匹配包含模式的每个依赖项放入自己的中。
这是我的集会的相关部分
特性.**:jar false
这将使模块的所有依赖项都具有`com.test.feature.in a folder called module. This works for me, like so module/ com.test.feature.firstModule.jar com.test.feature.secondModule.jar What I need is a way to move each of the matching dependencies to its own folder, hopefully where the folder name is the artifactId of the dependency (not mandatory though) firstModule/ com.test.feature.firstModule.jar secondModule/ com.test.feature.secondModule.jar I know that I could create adependencySetfor each dependency, but the idea is to do this as future-proof as possible. If I create one for each, I will need to remember in the future to create a new set for every new artifact under com.test.feature. My biggest (but blind) hope is some kind of property ${dependencyName} that would be replaced for each dependency, which then I could use in theoutputDirectory`的groupId。这两件事,或者其中的一件,能用香草的组装插件来完成吗?如果没有,是否有可能创建一个扩展另一个插件的插件?我刚刚看过关于创建插件从无到有的教程,从来没有仅仅将功能添加到一个标准插件中。
发布于 2014-01-17 13:24:37
Q1:使用artifactId作为outputDirectory的值:
<outputDirectory>module/${artifact.artifactId}</outputDirectory>Q2:,我认为没有现成的解决方案。编写自己的插件;)
https://stackoverflow.com/questions/14843692
复制相似问题