XML Formatter Plugin

The XML Formatter plugin lets you format a project’s XML files.


To use the plugin, include it in your project’s root pom.xml file:


You can view an example POM containing the XML Formatter configuration here.


The plugin adds one Maven goal to your project:

xml-formatter:formatRuns the Liferay XML Formatter to format the project files.

Available Parameters

You can set the following parameters in the <configuration> section of the POM:

Parameter NameTypeDefault ValueDescription
fileNameStringnullThe XML file to format. This plugin only lets you format one XML file at a time.
stripCommentsbooleanfalseWhether to remove all the comments from the XML file.
« WSDD Builder PluginIntroduction to Project Templates »