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 <hello>world</hello>
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!
Showing posts with label variable. Show all posts
Showing posts with label variable. Show all posts
Friday, March 18, 2011
Thursday, July 29, 2010
How to do runtime property substitution for web.xml
- Place ${propertyName} in you web.xml file and specify the actual value via -DpropertyName=value (see a forum entry related to this...) also known as variable substitution.
- If you can afford to do this at compile time then:
- do so using a build tool such as maven (an example)
- Filter the web.xml file by configuring the maven-war-plugin as shown in the last post in this thread. There are some generic examples here too but they aren't as clear cut for the web.xml file.
- do so using a build tool such as maven (an example)
Subscribe to:
Posts (Atom)