Yes, they were in a properties file - I was a bit sceptical that this would
work for a system property like java.library.path so that's good you've
confirmed this
I'm trying to set up a build environment that's as automated as possible,
i.e. -D arguments aren't ideal, so I'd like to pursue the 2nd of your
suggestions. But I'm not quite sure where I'd put that little code snippet
as my Jelly skills are somewhat limited. I tried this as my maven.xml:
<project default="jar" xmlns:j="jelly:core">
<preGoal name="test:test">
<echo>Hacking path...</echo>
<j:set var="java.library.path" scope="system">C:/Foo</j:set>
</preGoal>
</project>
and then did
maven -Dmaven.junit.fork=true -Dmaven.junit.sysproperties=java.library.path
test
But that doesn't have the desired effect (BTW I tried the -D approach and
that does work)
many thanks for your help on this - think we're nearly there!
James
-----Original Message-----
From: Dion Gillard [mailto:[EMAIL PROTECTED]
Sent: 19 July 2004 13:12
To: Maven Users List
Subject: Re: RC4 to 1.0 problems
On Mon, 19 Jul 2004 08:57:45 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Run 1, with properties:
> java.library.path=${maven.tcw.path}
> maven.junit.sysproperties=java.library.path
Please tell me that these are not properties in a .properties file. You
can't change a system property by specifying it in a properties file. You
need to pass java.library.path in using -Djava.library.path=C:/blah, or use
${systemScope.put('java.library.path','c:/blah')}
If I do this:
maven "-Djava.library.path=C:\foo;%PATH%" -Dmaven.junit.fork=true
-Dmaven.junit.sysproperties=java.library.path -X test
I get this:
[junit] [DEBUG] Execute:Java13CommandLauncher: Executing
'C:\jdk1.3.1_07\jre\bin\java.exe' with arguments:
'-Dbasedir=C:\source\maven'
'-Djava.library.path=C:\foo;C:\Python23\.;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;c:\tools;C:\Program
Files\Common F
iles\Adaptec Shared\System;C:\Program
Files\cvsnt;C:\WebSphere\AppServer\bin;c:\cygwin\bin;C:\Program
Files\ibm\gsk5\lib;C:\PROGRA~1
\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPL
ES\REPL;'
Which is what I'd expect. Could you please try it this way?
> Run 2, with property:
> maven.junit.sysproperties=java.library.path=${maven.tcw.path}
I now get why this works, and it's just a fluke.
--
http://www.multitask.com.au/people/dion/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.
Internet communications are not secure and therefore the Barclays
Group does not accept legal responsibility for the contents of this
message. Although the Barclays Group operates anti-virus programmes,
it does not accept responsibility for any damage whatsoever that is
caused by viruses being passed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of the
Barclays Group. Replies to this email may be monitored by the Barclays
Group for operational or business reasons.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]