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

Issue 342 scm set tag add new elements #694

Conversation

jarmoniuk
Copy link
Contributor

@jarmoniuk jarmoniuk commented Sep 16, 2022

This is some enhancement of the scm-tag functionality. Whereas it was only possible to add new values to the existing scm subelements, this enhancement adds the possibility to add missing elements as well.

In the code, I've replaced stack usage with reflection in PomHelper, but it doesn't really make a difference (can revert it if necessary, I think it's a question of taste). Plus, encapsulated some implementation details, recursion state (drawback of using recursion), and helper methods within a local class.

It's not fully flexible -- it doesn't allow us to create new elements if also the parent element is missing -- but since it's not XSD-aware, it wouldn't know where to put the new element :)

@jarmoniuk jarmoniuk marked this pull request as ready for review September 16, 2022 06:01
@slawekjaranowski slawekjaranowski merged commit f5e8c9d into mojohaus:master Sep 17, 2022
@slawekjaranowski slawekjaranowski added this to the 2.13.0 milestone Sep 17, 2022
@jarmoniuk jarmoniuk deleted the issue-342-scm-set-tag-add-new-elements branch September 17, 2022 09:59
@jarmoniuk jarmoniuk restored the issue-342-scm-set-tag-add-new-elements branch September 17, 2022 11:58
@jarmoniuk
Copy link
Contributor Author

I think the PR removing BaseTestCase broke this test 😆

I'm gonna create a fixing PR right away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set-scm-tag functionality needed for Subversion
2 participants