Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying POM settings from plugin code

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.

like image 980
Martin Avatar asked Nov 06 '22 17:11

Martin


1 Answers

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 :)

like image 57
Pascal Thivent Avatar answered Nov 12 '22 17:11

Pascal Thivent