Friday, March 18, 2011

Escape dollar sign in maven's pom.xml file

When you want to escape stuff like <hello>world</hello> in your maven pom.xml file, you can do so by following the basic XML conventions and writing it as &lt;hello&gt;world&lt;/hello&gt;

But for some reason escaping the dollar sign doesn't seem so simple. So one usually turns to Google for an answer ... BUT before you go running around integrating velocity with maven because the top Google search results for escaping a dollar sign lead you the FAQ at http://docs.codehaus.org/display/MAVENUSER/Assembly+Plugin ... please know that something as simple as writing $${show_me} works and results in ${show_me} being escaped!

0 comments:

Post a Comment