You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Anthony N. Frasso" <af...@yahoo.com> on 2007/09/24 00:01:29 UTC
Setting the Endorsed Directory Location
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"/>
</javac>
</target>
Here is the console output:
$ ant
Buildfile: build.xml
init:
clean:
[delete] Deleting directory C:\Projects\Project\build
compile:
[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
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
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?
Regards,
Anthony Frasso
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Setting the Endorsed Directory Location
Posted by Peter Reilly <pe...@gmail.com>.
I have not tried, but you could try the following:
1) <compilerarg value="-endorseddirs lib"/> should be
<compilerarg line="-endorseddirs lib"/> or
<compilerarg value="-endorseddirs"/> <compilerarg value="lib"/>
2) use fork="yes on the <javac tag.
Peter
On 9/23/07, Anthony N. Frasso <af...@yahoo.com> wrote:
> 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"/>
> </javac>
> </target>
>
> Here is the console output:
>
> $ ant
> Buildfile: build.xml
>
> init:
>
> clean:
> [delete] Deleting directory C:\Projects\Project\build
>
> compile:
> [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
> 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
> 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?
>
> Regards,
> Anthony Frasso
>
>
>
> ____________________________________________________________________________________
> Pinpoint customers who are looking for what you sell.
> http://searchmarketing.yahoo.com/
>
> ---------------------------------------------------------------------
> 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
CVS Change Log Problem
Posted by "Anand J. Vithalani" <An...@Sun.COM>.
Hi
I am using ant task <cvschangelog>. In my Repository there are
multiple Branches beside main(root).
I am looking for changelogs only for main(root) branch & not other. The
XML result returned by Ant cvschangelog task includes results of all
branches along with root branch result.
Is there any way to filter out the result ? XML output doesn't
specified the branch so I can't modify XSLT to for filteration.
Thanks in Advance
Anand
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org