I'm preparing a maven2 web project for continuous integration. I use the maven cargo plugin to automatically deploy the WAR to Tomcat6x before running integration tests.
My code depends on some system properties which are set with MAVEN_OPTS=-Dfoo=bar
. Unfortunately these properties are missing when the application is deployed to Tomcat:
System.getProperty("foo"); // null, when deployed to container by maven-cargo
How can I pass these properties to Tomcat?