Skip to content
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

Maven - ChangeDependencyGroupIdAndArtifactId should allow adding a version tag #1723

Closed
nmck257 opened this issue Apr 27, 2022 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@nmck257
Copy link
Collaborator

nmck257 commented Apr 27, 2022

Currently, if you use the optional newVersion parameter, but the existing dependency in the pom does not include a version tag already (ie it is managed), then the newVersion value is effectively ignored.

It would be useful if this scenario instead added a version tag with the requested value.

@tkvangorder tkvangorder self-assigned this Apr 28, 2022
@tkvangorder tkvangorder added the enhancement New feature or request label Apr 28, 2022
@tkvangorder
Copy link
Contributor

@nmck257 Thanks for reporting the issue, this recipe now has an optional flag overrideManagedVersion which can be set to true to force the version to be added to the dependency even if there is a managed version for the new dependency.

Conversely, if the old dependency is not managed but the new artifact is managed (and the override is set to false), this recipe will remove the version from the dependency.

@tkvangorder
Copy link
Contributor

Let me know if this helps with your use cases and feel free to also reach out to the team on our slack org.

@nmck257
Copy link
Collaborator Author

nmck257 commented Apr 30, 2022

Nice changes! Thank you,

@nmck257
Copy link
Collaborator Author

nmck257 commented May 6, 2022

@nmck257 Thanks for reporting the issue, this recipe now has an optional flag overrideManagedVersion which can be set to true to force the version to be added to the dependency even if there is a managed version for the new dependency.

Conversely, if the old dependency is not managed but the new artifact is managed (and the override is set to false), this recipe will remove the version from the dependency.

@tkvangorder do you think similar logic could be ported into AddDependency? As far as I can tell, that one currently requires the client to configure a version, and the recipe has no cleverness for checking if the new dependency has a managed version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

2 participants