You need to set the maven.junit.sysproperties to a space-delimited list
of the properties you need your tests to know about.  See
http://maven.apache.org/reference/plugins/test/properties.html for a
description of this property with an example.
 

-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 09, 2005 3:32 AM
To: [email protected]
Subject: Maven properties inside java code

Hello all,
  i am using Maven to build my project, but i am stuck with a problem.
In running my tests, i would like to reuse inside my tests some
properties defined in my project.properties.
for example, i have to load a connection to a database (in my dbunit
test), and i would like to pick databasename,user,password etc from
project.properties.

i have defined thos eproperties in project.properties, and in my dbunit
file i am calling
System.getProperty("db.user") for example

but i get back null

can anyone help me ou t?>

thanx in advance and regards
 marco

---------------------------------------------------------------------
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]

Reply via email to