ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony N. Frasso" <>
Subject Setting the Endorsed Directory Location
Date Sun, 23 Sep 2007 22:01:29 GMT
Hello, and thanks for all of your help in advance.

I'm using Ant version 1.6.5 with the JDK v. 1.4.2.  I'm attempting to compile a
project that uses Xerces v. 2.9.1.  In order to compile properly, the XML API
included with Xerces needs to override the default XML API that comes with
JDK.1.4.2.  As I understand it, this is done by setting the "endorsed
directory" location to be the location of the Xerces jar files.

Unfortunately, using the <compilerarg> tag inside the <javac> task doesn't seem
to be accomplishing this.

Here is my target:

  <target name="compile>
    <mkdir dir="${build.classes.dir}"/>
    <javac destdir="${build.classes.dir}" debug="true">
      <src path="${src.dir}"/>
      <src path="${build.src.dir}"/>
      <classpath refid="compile.classpath"/>
      <compilerarg value="-endorseddirs lib"/>

Here is the console output:

$ ant
Buildfile: build.xml


   [delete] Deleting directory C:\Projects\Project\build

    [mkdir] Created dir: C:\Projects\Project\build\classes
    [javac] Compiling 97 source files to C:\Projects\Project\build\classes
    [javac] javac: invalid flag: -endorseddirs lib
    [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
                                            APIs are used
    [javac]   -classpath <path>         Specify where to find user class files
    [javac]   -sourcepath <path>        Specify where to find input source
    [javac]   -bootclasspath <path>     Override location of bootstrap class
    [javac]   -extdirs <dirs>           Override location of installed
    [javac]   -d <directory>            Specify where to place generated class
    [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
    [javac]   -help                     Print a synopsis of standard options

C:\Projects\Project\build.xml:141: Compile failed; see the compiler error
output for details.

Total time: 2 seconds

Any ideas on what I'm doing incorrectly?

Anthony Frasso

Pinpoint customers who are looking for what you sell.

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

View raw message