Closed motlin closed 4 months ago
Hi!
The keepBlankLines
option, in SortPom, lets you keep blank lines between two xml elements, e.g.
<name>Green</name>
<description>Salad</description>
Have you tried using xml:space="preserve"? E.g.
<unCheckedPluginList xml:space="preserve">
org.apache.maven.plugins:maven-site-plugin,
org.apache.maven.plugins:maven-deploy-plugin
</unCheckedPluginList>
That works, thanks! Are there no options to control this? I thought some of the options affected the newlines within the string, just not at the front or the end.
xml:space="preserve"
is a standard XML directive, and the XML framework that I use supported it, so there was no need to re-invent the wheel 😀.
I don't know if using newlines in XML elements is such a common case. I tend to use separator characters when possible to avoid the problem altogether, e.g ,:;
.
Glad that the problem is solved
I'm running the enforcer plugin and have this config in my pom.xml.
After formatting with sortpom, this xml becomes:
I have
<keepBlankLines>true</keepBlankLines>
so I was expecting these newlines to be kept.