ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Caponi" <>
Subject RE: whitespace for javac task
Date Mon, 05 Jan 2004 05:23:12 GMT
Try using the following property for source directory:
    <property name="src.dir" location="&quot;Java Source&quot;"/>

I guess that would pass "Java Source" (with the double-quotes) to javac. Let
us know if it works.

-----Original Message-----
From: []
Sent: Monday, January 05, 2004 10:10 AM
Subject: whitespace for javac task

Hi Guys,

I have a white space character in my source directory name. This is
causing problems for my javac task.

Here is the relevant build file snippet:

<project name="dmslite" default="help">

    <property name="src.dir" location="Java Source"/>
    <property name="build.dir" location="build"/>

  <target name="compile">
        <echo>compile required java source files...</echo>
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.dir}/classes"/>
        <javac  debug="on"
        <copy todir="${build.dir}/classes">
            <fileset dir="${src.dir}" includes="**/*.properties"/>


here are my results:

C:\xxxxx>ant deploy
Buildfile: build.xml

     [echo] compile required java source files...
    [javac] Compiling 1695 source files to C:\xxxxx\build\classes
    [javac] javac: invalid flag: C:\xxxxx\Java
    [javac] Usage: javac <options> <source files>
    [javac] where possible options include:
    [javac]   -g                        Generate all debugging info
    [javac]   -g:none                   Generate no debugging info
    [javac]   -g:{lines,vars,source}    Generate only some debugging info
    [javac]   -nowarn                   Generate no warnings
    [javac]   -verbose                  Output messages about what the
compiler is doing
    [javac]   -deprecation              Output source locations where
deprecated APIs are used
    [javac]   -classpath <path>         Specify where to find user class
    [javac]   -sourcepath <path>        Specify where to find input source
    [javac]   -bootclasspath <path>     Override location of bootstrap
class files
    [javac]   -extdirs <dirs>           Override location of installed
    [javac]   -d <directory>            Specify where to place generated
class files
    [javac]   -encoding <encoding>      Specify character encoding used by
source files
    [javac]   -source <release>         Provide source compatibility with
specified release
    [javac]   -target <release>         Generate class files for specific
VM version
    [javac]   -help                     Print a synopsis of standard

file:C:/xxxxx/build.xml:118: Compile failed; see the compiler error output
for details.

Total time: 3 seconds

Ofcourse the simplest solution would be to rename my "Java Source" direct
to something more sensible like "src", - but the project has a certain
amount of inertia, - just wondering if I can get this working without
changing one of the clearcase second-from-root directories...

Can I make the javac ant task not barf on whitespace?


James Head

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message