-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for property defined version update in the goal use-dep-version #474
Comments
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. |
I am still interested in this feature/use case. |
So, the problem is that all properties are resolved (interpolated) when processed by the mojo. Whilst the is matched by the mojo, PomHelper is unable to replace the dependency version because it's unable to retrieve the sought string (containing the resolved property value) in the POM, so the POM is not getting updated. Using a raw POM does help here; checking what the impact of changing that would be. |
Proposed new feature. /**
* <p>Will augment normal processing by, if a dependency value is set using a property, trying to update
* the value of the property.</p>
* <p>If the property value is specified directly, will process it normally (as with {@code processProperties} being
* {@code false}. If the property being updated is redefined in the reactor tree, will only change the property
* value which lies closest to the dependency being updated. If the same property is also used to set
* the value of another dependency, will not update that property value, and log a warning instead. Finally,
* if the property value is specified in a parent file which is outside
* of the project, will log a warning message.</p>
* <p>Default is {@code false}.</p>
*/
@Parameter(property = "processProperties", defaultValue = "false")
protected boolean processProperties; The default value is false to retain backwards compatibility. I'd be wary of changing it. What do you think, @slawekjaranowski @pzygielo? |
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties - changed to aggregator mode
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties - changed to aggregator mode
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties - changed to aggregator mode
- adding a new parameter, processProperties, which will also update property values if dependencies are controlled by properties - changed to aggregator mode
Thank you for supporting this use case! |
Hi @amalakar and all, thanks for this feature. I do get a NullPointerException when using it:
can you confirm this is the right way to use it? |
This will be fixed in the next release. Please use |
I noticed that currently
use-dep-version
works only when the version is defined inline, as in the following works:But the following property defined version doesn't get updated:
This is a feature request to make
use-dep-version
work for property defined dependencies too.Use case: we have many internal repositories which depends on few internal common libraries, sometimes we would want to update all of those repos to the latest version of the common libraries for bugs/security issues etc. But the downstream maven projects sometimes would have the version defined as a property or sometimes as inline version. If one command could handle both cases we could easily update all the repos to the target version.
The text was updated successfully, but these errors were encountered: