-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Sometimes child projects (in other repositories) which use our pom as parent may need to actually use the version of our pom for other things, such as configuring some plugin (e.g. to specify a version of a dependency we publish, and that will be used directly by the plugin).
It would thus be useful to define a property like <parent-pom.version>
that child projects could reference as needed (a bit like Spring Boot used to have one, see spring-projects/spring-boot#5014 – with the known limitations it had, e.g. you obviously can’t override it). This would be convenient so that the child projects only need to update the version of the parent, and not any other property.
I have noticed that you can do that with <properties>
, but it seems to have some limitations:
- you need to declare it in
maven-git-versioning-extension.xml
– we use a shared configuration so it is a bit annoying - you need to specify it for each branch/tag pattern
Is there another way to inject the computed version in the versioned pom? If not, is there a way to declare the property only once?