We ran into a parsing bug that prevents commenting out an option with a command line for maven. We tried commenting out (for testing purposes) the following plugin, which contains the "thrift --gen" command. The "--gen" caused a parse error in the file (looks like it thinks it needs to have --> because it is in a comment rather than --> as the only thing that matters. It would be *great* if it allowed nesting of comments, but I'll take that it just doesn't barf on valid command structures. Because the following is a comment, you *should* be able to paste it into any pom file and have maven process the file properly.
<!-- plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin --> <!-- plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <tasks> <mkdir dir="target/generated-sources/" /> <apply executable="/usr/local/bin/thrift" parallel="false"> the line below in a comment causes problems: <arg value="--gen" /> <arg value="java" /> <arg value="-out" /> <arg value="target/generated-sources/" /> <fileset dir="src/"> <include name="*.thrift" /> </fileset> </apply> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin -->