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

Ability to add new sections to pom.xml in Maven updater #989

Closed
cuixq opened this issue May 21, 2024 · 0 comments
Closed

Ability to add new sections to pom.xml in Maven updater #989

cuixq opened this issue May 21, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cuixq
Copy link
Contributor

cuixq commented May 21, 2024

Currently Maven updater can only substitute elements in pom.xml, however, we may want to add new section (for example <dependencyManagment/>) to pom.xml for guided remediation.

@cuixq cuixq added the enhancement New feature or request label May 21, 2024
@cuixq cuixq self-assigned this Jun 7, 2024
cuixq added a commit that referenced this issue Jul 11, 2024
#989

For the purpose of overriding dependency requirements, we may need to
add new dependencies or even dependency management section to pom.xml.
This PR:
 - moves the patch generation from suggester to updater
 - before writing patches, prepare dependency and property patches
- when updating dependencies, if a dependency is not from the base
project, we should add a new section
- when updating a project, if dependency management is not updated and
there are patches from dependency management, add a new dependency
management section
 - marks the parent dependency patch to have type "pom"

TODOs:
- need to find a way to differentiate patches for guided remediation or
general updates, since we should not add new sections for general
updates (using `OrigRequire` seems reasonable)
- make the indentation for the new sections configuration, now defaults
to a white space
@cuixq cuixq closed this as completed Jul 12, 2024
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
None yet
Development

No branches or pull requests

1 participant