You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by james_d <ja...@gmail.com> on 2009/01/21 23:55:33 UTC

Passing system properties to JUnit using "-D" on Linux


When I compile/test my software on Windows any -D system properties I
specify on the command line (e.g., mvn clean install -Dkey1=value1) are
available inside my JUnit tests by calling the System.getProperty() method
(e.g., System.getProperty("key1") returns "value1").  

However, I noticed that when I run my build on Linux that the properties are
not available.  Specifically, calling System.getProperty("key1") returns
null.  What's going on?  I'm using maven 2.0.9 for both.

Thanks for the help!
-- 
View this message in context: http://www.nabble.com/Passing-system-properties-to-JUnit-using-%22-D%22-on-Linux-tp21593647p21593647.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Passing system properties to JUnit using "-D" on Linux

Posted by Jaikiran <ja...@yahoo.co.in>.
Being discussed in your other post here
http://www.nabble.com/Passing-system-properties-to-JUnit-tests-using-%22-D%22-on-Linux-td21593651.html
-- 
View this message in context: http://www.nabble.com/Passing-system-properties-to-JUnit-using-%22-D%22-on-Linux-tp21593647p21598856.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org