You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ot...@ivillage.com on 2001/10/31 19:46:30 UTC
Bug in - extra quotation marks
Hello,
This looks like a bug in Ant.
Inside of <junit> I am specifying some JVM arguments, like this:
<jvmarg value="-Dxxx.data=/home/data -Dxxx.config=/home/config"/>
Yet, when I invoke Ant with -v I see:
Executing: /usr/local/jdk/jre/../bin/java "-Dxxx.data=/home/data
-Dxxx.config=/home/config" -classpath ... my.test.class
The problem are those quotation marks around -D flags.
They cause java to be invoked incorrectly.
I tried this outside Ant, invoking java directly with the same parameters, once with those quotation marks and once witout.
It fails when quotation marks are used - the -D parameters
do not get passed to the JVM correctly.
That is why I cannot get my junit test to pass - it cannot get the value of one of the parameters that I specified in <jvmarg> element because Ant wraps the value I specified in "" :(
This definitely looks like an easy to fix bug to me.
Will this bug report reach Ant developers or should I submit
the bug directly?
Thanks,
Otis
_________________________________________________________________
iVillage.com: Solutions for Your Life
Check out the most exciting women's community on the Web
http://www.ivillage.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: deltree does not work
Posted by Bevan Arps <be...@actfs.co.nz>.
At 13:58 31/10/2001 -0600, you wrote:
>Here is my xml ant file. By some reason target "clean" does not work.
>All directories which have to be deleted by that target are not deleted.
>What's wrong in my project?
Deltree is deprecated -- it is going to go away soon -- you should be using
the delete task instead.
> <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
try something like this instead:
<delete includeEmptyDirs="true">
<fileset dir="dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
</delete>
Cheers,
Bevan.
--
"Programming is an Art Form that Fights Back"
Bevan Arps (<ma...@actfs.co.nz>bevan.arps@actfs.co.nz)
Senior OO Analyst, ACT Financial Systems
This communication is confidential to ACT Financial Systems (Asia
Pacific) and is intended for use only by the addressee. The views and
opinions expressed in this email are the senders own and do not
represent the views and opinions of ACT Financial Systems (Asia
Pacific).
Re: deltree does not work
Posted by Gene Margolin <gm...@futuresource.com>.
No. I'd like to remove some classes BEFORE creating cab and jar archives.
There are about 20 more folders in ${destdir.dir}.
Gene.
Bevan Arps wrote:
> At 14:24 31/10/2001 -0600, you wrote:
> >I've changed "deltree" by "delete".
> >The same result.
> >No error messages.
> >All directories are still here.
> >
> ><target name="clean" depends="compile">
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
> ></target>
>
> These deltree lines say "delete everything under
> ${destdir.dir}/com/futuresource/jmaf/charts/util"
>
> Are you in fact wanting to delete everything under ${destdir.dir} instead?
>
> Cheers,
> Bevan.
>
> --
> "Programming is an Art Form that Fights Back"
>
> Bevan Arps (<ma...@actfs.co.nz>bevan.arps@actfs.co.nz)
> Senior OO Analyst, ACT Financial Systems
>
> This communication is confidential to ACT Financial Systems (Asia
> Pacific) and is intended for use only by the addressee. The views and
> opinions expressed in this email are the senders own and do not
> represent the views and opinions of ACT Financial Systems (Asia
> Pacific).
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: deltree does not work
Posted by Bevan Arps <be...@actfs.co.nz>.
At 14:24 31/10/2001 -0600, you wrote:
>I've changed "deltree" by "delete".
>The same result.
>No error messages.
>All directories are still here.
>
><target name="clean" depends="compile">
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
></target>
These deltree lines say "delete everything under
${destdir.dir}/com/futuresource/jmaf/charts/util"
Are you in fact wanting to delete everything under ${destdir.dir} instead?
Cheers,
Bevan.
--
"Programming is an Art Form that Fights Back"
Bevan Arps (<ma...@actfs.co.nz>bevan.arps@actfs.co.nz)
Senior OO Analyst, ACT Financial Systems
This communication is confidential to ACT Financial Systems (Asia
Pacific) and is intended for use only by the addressee. The views and
opinions expressed in this email are the senders own and do not
represent the views and opinions of ACT Financial Systems (Asia
Pacific).
Re: deltree does not work
Posted by Diane Holt <ho...@yahoo.com>.
--- Gene Margolin <gm...@futuresource.com> wrote:
> I've changed "deltree" by "delete".
> The same result.
> No error messages.
> All directories are still here.
Try:
<target name="clean" depends="compile">
<delete includeEmptyDirs="yes">
<fileset dir="${destdir.dir}/com/futuresource/jmaf">
<include name="charts/*.class"/>
<include name="lang/expression/**"/>
<include name="tuple/**"/>
</fileset>
</delete>
</target>
If that doesn't work, try running with -verbose and sending the
(relevant)output.
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: deltree does not work
Posted by Gene Margolin <gm...@futuresource.com>.
I've changed "deltree" by "delete".
The same result.
No error messages.
All directories are still here.
Gene.
T Master wrote:
> 1.
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
>
> 2. I have never used deltree. I use <delete> to delete a directory
> including subdirs.
> Look it up in the manual.
>
> ----- Original Message -----
> From: "Gene Margolin" <gm...@futuresource.com>
> To: "Ant Users List" <an...@jakarta.apache.org>
> Sent: Wednesday, October 31, 2001 12:58 PM
> Subject: deltree does not work
>
> > Hi.
> >
> > Here is my xml ant file. By some reason target "clean" does not work.
> > All directories which have to be deleted by that target are not deleted.
> > What's wrong in my project?
> >
> > Thank you in advance.
> >
> > Gene.
> >
> >
> > <!-- Jmaf build file -->
> >
> > <project name="jmaf" default="compile" basedir=".">
> > <property name="src.dir" value="ant/java"/>
> > <property name="build.dir" value="ant/java_classes"/>
> > <property name="dist.dir" value="ant/java_build"/>
> > <property name="build.compiler" value="classic"/>
> > <property name="ant.home" value="ant"/>
> >
> > <target name="compile">
> > <mkdir dir="${build.dir}"/>
> > <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
> >
> > <!-- NewsWatch -->
> > <mkdir dir="${build.dir}/NewsWatch"/>
> > <javac
> > srcdir="${src.dir}"
> > destdir="${build.dir}/NewsWatch"
> >
> classpath="${src.dir}/env/extern;${src.dir}/jars/capsapi_classes.zip"
> >
> >
> includes="com/futuresource/newswatch/NewsWatch.java,com/futuresource/jmafkit
> /quantum/QuantumSession.java"
> >
> > debug="off"
> > optimize="off"
> > />
> > </target>
> >
> > <target name="clean" depends="compile">
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
> > <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
> > </target>
> >
> > </project>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: deltree does not work
Posted by T Master <tm...@iknowledgeinc.com>.
1.
<deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
2. I have never used deltree. I use <delete> to delete a directory
including subdirs.
Look it up in the manual.
----- Original Message -----
From: "Gene Margolin" <gm...@futuresource.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Wednesday, October 31, 2001 12:58 PM
Subject: deltree does not work
> Hi.
>
> Here is my xml ant file. By some reason target "clean" does not work.
> All directories which have to be deleted by that target are not deleted.
> What's wrong in my project?
>
> Thank you in advance.
>
> Gene.
>
>
> <!-- Jmaf build file -->
>
> <project name="jmaf" default="compile" basedir=".">
> <property name="src.dir" value="ant/java"/>
> <property name="build.dir" value="ant/java_classes"/>
> <property name="dist.dir" value="ant/java_build"/>
> <property name="build.compiler" value="classic"/>
> <property name="ant.home" value="ant"/>
>
> <target name="compile">
> <mkdir dir="${build.dir}"/>
> <deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
>
> <!-- NewsWatch -->
> <mkdir dir="${build.dir}/NewsWatch"/>
> <javac
> srcdir="${src.dir}"
> destdir="${build.dir}/NewsWatch"
>
classpath="${src.dir}/env/extern;${src.dir}/jars/capsapi_classes.zip"
>
>
includes="com/futuresource/newswatch/NewsWatch.java,com/futuresource/jmafkit
/quantum/QuantumSession.java"
>
> debug="off"
> optimize="off"
> />
> </target>
>
> <target name="clean" depends="compile">
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
> <deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
> </target>
>
> </project>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
deltree does not work
Posted by Gene Margolin <gm...@futuresource.com>.
Hi.
Here is my xml ant file. By some reason target "clean" does not work.
All directories which have to be deleted by that target are not deleted.
What's wrong in my project?
Thank you in advance.
Gene.
<!-- Jmaf build file -->
<project name="jmaf" default="compile" basedir=".">
<property name="src.dir" value="ant/java"/>
<property name="build.dir" value="ant/java_classes"/>
<property name="dist.dir" value="ant/java_build"/>
<property name="build.compiler" value="classic"/>
<property name="ant.home" value="ant"/>
<target name="compile">
<mkdir dir="${build.dir}"/>
<deltree dir="${src.dir}/com/futuresource/jmaf/charts/tests"/>
<!-- NewsWatch -->
<mkdir dir="${build.dir}/NewsWatch"/>
<javac
srcdir="${src.dir}"
destdir="${build.dir}/NewsWatch"
classpath="${src.dir}/env/extern;${src.dir}/jars/capsapi_classes.zip"
includes="com/futuresource/newswatch/NewsWatch.java,com/futuresource/jmafkit/quantum/QuantumSession.java"
debug="off"
optimize="off"
/>
</target>
<target name="clean" depends="compile">
<deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/util"/>
<deltree dir="${destdir.dir}/com/futuresource/jmaf/charts/*.class"/>
<deltree dir="${destdir.dir}/com/futuresource/jmaf/lang/expression"/>
<deltree dir="${destdir.dir}/com/futuresource/jmaf/tuple"/>
</target>
</project>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Bug in - extra quotation marks
Posted by Diane Holt <ho...@yahoo.com>.
--- otisg@ivillage.com wrote:
> This looks like a bug in Ant.
>
> Inside of <junit> I am specifying some JVM arguments, like this:
> <jvmarg value="-Dxxx.data=/home/data -Dxxx.config=/home/config"/>
>
> Yet, when I invoke Ant with -v I see:
>
> Executing: /usr/local/jdk/jre/../bin/java "-Dxxx.data=/home/data
> -Dxxx.config=/home/config" -classpath ... my.test.class
>
> The problem are those quotation marks around -D flags.
Use the "line" attribute instead of "value".
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>