ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JH...@ids.com.au
Subject RE: whitespace for javac task
Date Mon, 05 Jan 2004 05:45:33 GMT
No luck there.

BUILD FAILED
file:C:/ant-play/dmslite/build.xml:118: srcdir "C:\ant-play\dmslite\"Java 
Source"" does not exist!

thanks anyhow, I'll keep scratching my head.

James Head.






"Al Caponi" <don_alcaponi@yahoo.com.sg>
05/01/2004 04:23 PM
Please respond to "Ant Users List"

 
        To:     "Ant Users List" <user@ant.apache.org>
        cc: 
        Subject:        RE: whitespace for javac task


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: JHead@ids.com.au [mailto:JHead@ids.com.au]
Sent: Monday, January 05, 2004 10:10 AM
To: user@ant.apache.org
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"
                classpathref="build.classpath"
                fork="true"
                memoryInitialSize="128m"
                memoryMaximumSize="128m"
                srcdir="${src.dir}"
                destdir="${build.dir}/classes"/>
        <copy todir="${build.dir}/classes">
            <fileset dir="${src.dir}" includes="**/*.properties"/>
        </copy>
    </target>

</project>



here are my results:


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

compile:
     [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
files
    [javac]   -sourcepath <path>        Specify where to find input source
files
    [javac]   -bootclasspath <path>     Override location of bootstrap
class files
    [javac]   -extdirs <dirs>           Override location of installed
extensions
    [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
options


BUILD FAILED
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?

thanks!

James Head






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message