I'm just guessing here, but since only string properties are passed you need
to define a string property which is based on the non-string property. 
Perhaps you could define:
outDir=${project.build.outputDirectory}

Perhaps you could define this in a profile, or in project.properties or
something?

David


Binil Thomas wrote:
> 
> Hi all,
> 
> The Surefire plugin documentation
> (http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html)
> mentions:
> 
> [snip]
> Take note that String valued properties can only be passed as system
> properties. Any attempt to pass any other maven variable type (i.e. List
> or a URL variable) will cause the variable expression to be passed
> literally (unevaluated).
> [/snip]
> 
> In my test, I need to get the value of the maven variable
> ${project.build.outputDirectory} as a String (I need to generate some file
> at the end of the test, and I need to create this file in
> ${project.build.outputDirectory). How do I force the evaluation of the
> variable first, and then pass it to the test a system property?
> 
> This was discussed in the thread
> http://www.nabble.com/Passing-maven-variables-as-system-properties-tf1256766s177.html#a3332659,
> but not properly answered.
> 
> Thanks,
> Binil
> 

-- 
View this message in context: 
http://www.nabble.com/Passing-Maven-Variable-as-a-system-property-to-the-tests-tf2600462s177.html#a7356447
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to