-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I have a pom.xml which is structed like this:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-module</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<xml-format-plugin.version>3.2.2</xml-format-plugin.version>
<sonar.coverage.exclusions><![CDATA[
src/main/java/A.java,
src/main/java/B.java,
src/main/java/C.java,
]]></sonar.coverage.exclusions>
<sonar.exclusions><![CDATA[
src/main/java/D.java,
src/main/java/E.java,
]]></sonar.exclusions>
</properties>
<build>
<plugins>
<plugin>
<groupId>au.com.acegi</groupId>
<artifactId>xml-format-maven-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<id>xml-format</id>
<goals>
<goal>xml-format</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<indentSize>2</indentSize>
<suppressDeclaration>true</suppressDeclaration>
<keepBlankLines>true</keepBlankLines>
<includes>pom.xml</includes>
<lineEnding>CRLF</lineEnding>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Here's a screenshot of Notepad++ after the pom.xml was formatted:
I have several issues with the current behavior:
- The plugin inserts an empty line at the top
- The line breaks after
</xml-format-plugin.version>
areLFCRLF
, so 1 Linux line break followed by 1 Windows line break. Both should be CRLF. - The CDATA content will also have LFs instead of CRLFs.
- If I don't put the lines in the sonar exclusions into CDATA, the plugin will delete the text content.
Metadata
Metadata
Assignees
Labels
No labels