Maven HTMLCompressor Plugin allows to compress html/xml by adding a few lines to the pom file.
'com.tunyk.mvn.plugins.htmlcompressor:htmlcompressor-maven-plugin:1.0'
<dependency>
<groupId>com.tunyk.mvn.plugins.htmlcompressor</groupId>
<artifactId>htmlcompressor-maven-plugin</artifactId>
<version>1.0</version>
</dependency>
<dependency org="com.tunyk.mvn.plugins.htmlcompressor" name="htmlcompressor-maven-plugin" rev="1.0"/>
"com.tunyk.mvn.plugins.htmlcompressor", "htmlcompressor-maven-plugin", "1.0"