是否可以使用不同的配置文件执行多个release:perform,而不必再次执行release:prepare?
我有一个项目的 POM 文件,它根据环境(测试、生产、开发)为项目定义不同的分类器。
我想对每个环境执行一次release:prepare,然后执行release:perform,生成相应的包文件。
问题是,在第一次调用 release:perform 后,它会删除 release:prepare 生成的元数据。我认为它正在调用release:clean。
如何防止清理此元数据,以便使用不同的配置文件执行 release:perform ,而不必再次执行 release:prepare ?
I have a POM file for a project that defines different classifiers for a project depending on the environment (test, production, development).
I would like to execute one time release:prepare and then execute release:perform for each environment to generate the corresponding package file.
The problem is that after the first call to release:perform it removes the metadata generated by release:prepare. I think it is calling release:clean.
How can I prevent cleaning up this metadata in order to execute release:perform with different profiles without having to execute release:prepare again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,干净的目标是固定在执行生命周期中的,唯一的方法似乎是使用 -DdryRun=true 运行 Maven
请参阅此处:
http://svn.apache.org/viewvc/maven/release/tags/maven-release-2.1/maven-release-manager/src/main/java /org/apache/maven/shared/release/DefaultReleaseManager.java?view=markup 从第 266 行 ...
Unfortunately the clean goal is fixed in the perform lifecylce, the only way around it seems to run maven with -DdryRun=true
See here:
http://svn.apache.org/viewvc/maven/release/tags/maven-release-2.1/maven-release-manager/src/main/java/org/apache/maven/shared/release/DefaultReleaseManager.java?view=markup from line 266 ...