I was working on a Maven build a while back and was trying to figure out how to pass a JVM argument to the Maven Surefire plugin. We needed this capability in order to tell the underlying framework to not attempt to perform a JNDI lookup for its datasource and instead to use a DriverManager. I came across this little gem and thought I would share.
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <argLine>-DSTANDALONE_DATASOURCE=true</argLine> </configuration> </plugin> </plugins> </build>