首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >扩展maven插件

扩展maven插件
EN

Stack Overflow用户
提问于 2013-02-12 23:18:42
回答 1查看 1.3K关注 0票数 1

我正在尝试使用maven程序集插件生成一个zip文件程序集。我只剩下两个问题,我想知道是否可以通过配置来解决,但作为最后的手段,我也在考虑编写我自己的maven插件,它扩展了maven程序集插件。

这两个缺失的部分是

  1. 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。
  2. 生成一个xml文件,其中包含有关依赖项及其文件夹的信息()。 就像这样 <模块dir="firstModule“version=”1.0-快照/> < dir="secondModule“version=”2.1-快照/> 生成的xml将是zip程序集的一部分。

这两件事,或者其中的一件,能用香草的组装插件来完成吗?如果没有,是否有可能创建一个扩展另一个插件的插件?我刚刚看过关于创建插件从无到有的教程,从来没有仅仅将功能添加到一个标准插件中。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-17 13:24:37

Q1:使用artifactId作为outputDirectory的值:

代码语言:javascript
复制
<outputDirectory>module/${artifact.artifactId}</outputDirectory>

Q2:,我认为没有现成的解决方案。编写自己的插件;)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14843692

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档