Closed vmckinney-cainc closed 1 month ago
struggling with this as well at the moment. trying to do some "overrides" during a specific phase of development. since dependencies are inherited the use-dep-version goal doesn't do anything.
what works (but quite complicated) is to add a dummy version element in the pom and then replace it with the correct version.
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Hi all,
I am wondering if it is possible to use use-dep-version in a child project to override a dependency version defined in a parent.
For example, in a parent POM:
Then, in a child that consumes the parent:
I get this error:
Looking at the code: https://github.com/mojohaus/versions/blob/0b860eb781f139eb126a4952d51e87e9bc31f63b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java#L357-L360
It seems this happens when the version is null, which I assume is because it's not grabbing the version from the parent. Does the functionality to override versions defined in the parent exist in versions-maven-plugin? If so, is there an obvious issue here? If the functionality exists and you need a minimal reproducible example I can create one -- the actual codebase this fails in is private.
Thank you!