I've just recently started writing Maven plugins and was wondering if there is a common way to modify the values within the pom.xml
file e.g. changing an artifacts version number. With the exception of the line being modified I would want the remaining formatting within the xml file to be preserved. I'm just about to start manually doing this via Java DOM libraries, but wanted to check first if there are any Maven convenience classes/functions for this.
Thanks.
My advice would be to check how this is done in the maven-release-plugin. Actually, the interesting parts are in maven-release-manager. Get the sources and dig :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With