Right.  Your tests are getting spun off in a new VM, so Maven must
know what system properties it should pass along to the new VM.

On 6/9/05, David Jackman <[EMAIL PROTECTED]> wrote:
> You can allow your tests to see whatever properties you want by setting
> the maven.junit.sysproperties property to the space-delimited list of
> property names.  See
> http://maven.apache.org/reference/plugins/test/properties.html for more
> information.
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 09, 2005 3:43 PM
> To: [email protected]
> Subject: Question about -D
> 
> Is the -D option only for sending system properties to Maven itself, or
> can I set properties that my testcases can see when I run them via
> "maven test"
> ?
> 
> In the Eclipse IDE, I can add "-Dmyproperty=foo" to the "VM Arguments"
> and my testcase can call System.getProperty() to get the value.
> 
> I was trying to achieve the same thing with a Maven command line, like
> this but the System.getProperty() and even
> System.getProperties().list(System.out); show that it's not set when the
> testcase runs.
> 
>       maven test:single -Dtestcase=com.yadda.SystemPropertyTest
> -Dmyproperty=foo
> 
> Am I using it wrong or was it even meant for this?
> -Jeff
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Jamie Bisotti
Software Engineer
Lexmark International, Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to