Thanks Hermod, you've helped me make *some* progress.
It appears the problem is that the variable name I'm using is not
recognised, so the original expression is passed unaltered.
${pom.name} works fine for example (expanded)
However none of the following work:
${project.build.outputDirectory}
${project.build.directory}
${pom.build.directory}
Anyone know what the magic variable name is for passing the
outputDirectory (ie dir where main java src gets compiled to) to the
unit tests as a system property?
Thanks,
Simon
On Fri, 2006-03-10 at 11:47 +0100, [EMAIL PROTECTED] wrote:
> Hi
>
> Try project.build.directory
>
> Hermod
>
> -----Original Message-----
> From: Simon Kitching [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 10, 2006 3:53 AM
> To: [email protected]
> Subject: Passing maven variables as system properties
>
>
> Hi,
>
> I'm trying to store some maven vars into system properties so I can
> access them from unit test code:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <systemProperties>
> <property>
> <name>core-static</name>
> <value>${project.build.outputDirectory}/</value>
> </property>
> <property>
> <name>core-static-tests</name>
> <value>${project.build.testOutputDirectory}/</value>
> </property>
> </systemProperties>
> </configuration>
> </plugin>
> </plugins>
>
> However the value of
> System.getProperty("core-static")
> is literally "${project.build.outputDirectory}", not the expanded value.
>
> Does anyone know how I can pass the value of this expression?
>
> Thanks,
>
> Simon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that DnB NOR cannot
> accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
>
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
>
> ---------------------------------------------------------------------
> 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]