I am using org.apache.maven.model.io.xpp3.MavenXpp3Reader
and org.apache.maven.model.io.xpp3.MavenXpp3Writer
to perform read and write operations on a POM. I would like to add comments as well. I do not want to process the entire String again and write my logic to insert comments. Is there some other way to insert comments and comment out already present tags?
I know this is old but in case anyone else is looking... Comments in any xml file, including the POM in a Maven project are signified with with an exclamation tag
<!--my comment-->
Or an example block commented out
<!--
<dependencies>
<dependency>
<groupId>com.group</groupId>
<artifactId>anId</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
-->
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