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

Comma-separated 'property' values no longer work in 2.9.0 #543

Closed
gvisokinskas opened this issue Jan 25, 2022 · 1 comment · Fixed by #546
Closed

Comma-separated 'property' values no longer work in 2.9.0 #543

gvisokinskas opened this issue Jan 25, 2022 · 1 comment · Fixed by #546
Assignees

Comments

@gvisokinskas
Copy link

In the previous release (2.8.1), it was possible to update multiple properties (and set them all to the same version) by using:

mvn versions:set-property -DnewVersion=22.1 -Dproperty=foo,bar,baz

However, after the changes in #470, this command no longer works and throws an NPE instead:

Caused by: java.lang.NullPointerException
    at org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader.replaceBetween (ModifiedPomXMLEventReader.java:515)
    at org.codehaus.mojo.versions.api.PomHelper.setPropertyVersion (PomHelper.java:209)
    at org.codehaus.mojo.versions.SetPropertyMojo.update (SetPropertyMojo.java:129)
    at org.codehaus.mojo.versions.SetPropertyMojo.update (SetPropertyMojo.java:111)
    at org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo.process (AbstractVersionsUpdaterMojo.java:315)
    at org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo.execute (AbstractVersionsUpdaterMojo.java:250)
    <...>

I'm not really sure whether the previous functionality was supported, as I couldn't find any documentation for the property attribute, but it would be nice to fix the NPE regardless.

@stefanseifert
Copy link
Contributor

you're right, this was supported with the previous version, probably more by accident.
i've added back that support with #543 and also added an IT for that behavior

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

Successfully merging a pull request may close this issue.

2 participants