commit | af72ee50bae48222c924f1ca7b86d903de05f77a | [log] [tgz] |
---|---|---|
author | tibordigana <tibordigana@apache.org> | Sun Aug 18 23:06:17 2019 +0200 |
committer | tibordigana <tibordigana@apache.org> | Sun Aug 18 23:06:17 2019 +0200 |
tree | 99ea1ff67adede374efe552c8e8c60e6336eff01 | |
parent | 764145b4625f946cf4c3607aab668d2a6ab36dd8 [diff] |
normalize document POM
diff --git a/archetype-common/src/main/java/org/apache/maven/archetype/common/util/PomUtils.java b/archetype-common/src/main/java/org/apache/maven/archetype/common/util/PomUtils.java index 55c2f1b..caea494 100644 --- a/archetype-common/src/main/java/org/apache/maven/archetype/common/util/PomUtils.java +++ b/archetype-common/src/main/java/org/apache/maven/archetype/common/util/PomUtils.java
@@ -132,6 +132,8 @@ tr.setOutputProperty( OutputKeys.METHOD, "xml" ); tr.setOutputProperty( OutputKeys.ENCODING, "UTF-8" ); tr.setOutputProperty( "{http://xml.apache.org/xslt}indent-amount", "2" ); + document.getDomConfig().setParameter( "infoset", Boolean.TRUE ); + document.getDocumentElement().normalize(); tr.transform( new DOMSource( document ), new StreamResult( fileWriter ) ); return true; }