Maven2:在包阶段重命名提供的依赖项?
我有一个耳朵工件,其POM
中的构建定义中有一个 FinalName 标签。
<artifactId>application-app</artifactId>
...
<build>
<finalName>application</finalName>
这导致我在构建时将工件 application-app 作为文件 application.ear 获得。由于与其他解决方案的一些大量遗留集成,ear 文件的命名很重要。
问题是我们有几个特定的构建项目,它们都包含这个 Ear 作为提供的依赖项。由于实际的工件名称是 application-app,因此它显示为 application-app.ear ->运行时崩溃。
将工件 ID 从 application-app 更改为 application 不是一个选项。
您是否知道一种在提供的依赖项上实现类似 FinalName 的操作的方法(我猜是在包阶段......)?
Greetings
I have an ear artifact with a finalName tag in its build definition in the POM.
<artifactId>application-app</artifactId>
...
<build>
<finalName>application</finalName>
This results in me getting the artifact application-app as the file application.ear when building. It is important that the ear file is named like this due to some heavy legacy integration with other solutions.
The problem is that we have several specific build projects, which all include this ear as a provided dependency. Since the actual artifact name is application-app it comes out as application-app.ear -> runtime crash.
Changing the artifact ID from application-app to application is not an option.
Do you know of a way to implement a finalName like operation on provided dependecies (I guess in the package phase...)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试配置 Maven EAR 插件:
Try configuring the Maven EAR plugin: