I've a strange scenario where I have a project "Y" and it has a module "X" and some other modules as well.
X is part of a project Y however it is not linked as a module of that project. Because of that, each time a newer version of Y is released someone needs to manually update the parent version in X.
I need to update the Y project in such a way that: a)each time the Y project is released, the parent project version in X should be automatically updated by TeamCity (in a similar way as for other modules)
b)X must not be a part of Y distribution
c)Once deployed in TeamCity, it should not run tests from X (they should be run with Integration tests and Release builds)
versions:update-parent
If you open a terminal at the root of your project
X
, you can useversions:update-parent
to update its parent version to thelatest
:You can execute this command from TeamCity and then commit the changes to the pom. This can certainly be triggered when
Y
is built, you could even provide the version (it must be alist
or arange
):Documentation
See versions-maven-plugin's documentation, especially:
versions:update-parent
versions:set
versions:commit
versions:update-child-modules