Hi,
My problem involved the attribute jvmarg set to a property which value
is ""...
Using Ant 1.6.4, I am using the java task to launch various process:
/ <java classname="${classname}">/
/ <arg value="${arg1}" />/
/ <arg value="${arg2}" />/
/ <jvmarg value="${jvmarg1}" />/
/ <jvmarg value="${jvmarg2}" />/
/ </java>/
For each class the properties (arg1, arg2, jvmarg1, jvmarg2,etc. ) are
loaded from xml file.
After that, for each undefined property, its value is set to "".
As a property cannot be overwritten, it behaves as defining a default value.
This is working fine as long as jvmarg1 & jvmarg2 properties have a
value but breaks when they use "" as default value.
Running ant -debug gives the following:
/''/
/''/
/The ' characters around the executable and arguments are/
/not part of the command./
/ [java] Exception in thread "main" java.lang.NoClassDefFoundError:/
/BUILD FAILED/
It seems that empty jvmarg is the caused but I need to find a way to
inhibit jvmarg attribute when the associated property is not used.
This basically, the same problem as mentionned at this link:
http://www.jguru.com/forums/view.jsp?EID=1275301
But the switch/case-like solution given is not flexible enough for my needs.
Hope somebody faced & solved this issue before ;)
Thank you,
Frederic CHALONS
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]