我有多个相互依赖的 Elipse 插件项目。与此相关的几个问题:
1)如果我更改一个插件的版本号,是否可以自动更新依赖插件的plugin.xml 文件以反射(reflect)版本号更改?
2)Maven pom 也是如此:当我更改版本号时,我可以以某种方式自动更新 pom 吗?
3)如果我想保持plugin.xml和pom.xml版本号一致,是否有自动方法可以做到这一点?
4)最后:如果我有多个项目应该具有相同的版本号,我可以以某种方式同步版本号吗?
最佳答案
使用Maven Release Plugin - 尤其是update-versions
goal - 至少可以解决您已经解决的一些问题。
来自 http://maven.apache.org/ 的文档:
In some situations you may want an easy way to update the version numbers in each POM of a multi-module project. The update-versions goal is designed to accomplish this.
To update the version numbers in your POMs, run:
mvn release:update-versions
You will be prompted for the version number for each module of the project. If you prefer that each module version be the same as the parent POM, you can use the option autoVersionSubmodules.
mvn release:update-versions -DautoVersionSubmodules=true
In this case you will only be prompted for the desired version number once.
关于java - Eclipse 插件的跨项目版本控制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10789721/