Try setting the command line argument through one of the properties of the test plugin. Check the following link:
http://maven.apache.org/reference/plugins/test/properties.html Andrei --- "Walsh, Richard (Richard)" <[EMAIL PROTECTED]> wrote: > Hi, > I am using maven to run unit tests. However, the > code in the unit tests > needs a command line argument to specify the project > home directory. So, > I run maven with the -D option as follows. > > maven -Ddemo.home=c:\myHomeDir test:test > > However, in the reports generated in the target > directory the code is > complaining that the demo.home variable is not set. > This means that the > System.getProperty("demo.home") is not picking up > the variable. > > Has anyone seen anything like this before. Is there > a solution or am I > doing something wrong I also tried setting setting > the > MAVEN_CMD_LINK_ARGS variable in the maven.bat file > to > -Ddemo.home=c:\myHomeDir and this produced the same > result. > > thanks, > Richie. > __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
