Output valid xml when executing mvn help:effective-pom Output valid xml when executing mvn help:effective-pom xml xml

Output valid xml when executing mvn help:effective-pom


Use output property:

mvn help:effective-pom -Doutput=< FILE >


As a workaround

mvn help:effective-pom | grep -v '\[INFO\|\[WARNING\|Downloading' | sed '1,2d' | xml sel -N x=http://maven.apache.org/POM/4.0.0 -t -c "/x:project/x:properties"

will output the properties as xml.

You need xmlstarlet.

brew install xmlstarlet #OSXapt-get install xmlstarlet