How to add -Xlint in Ant's build.xml file?

R

RC

I have a very simple section of ant's build.xml file
for javac

<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.prod.dir}">
<classpath refid="project.classpath"/>
</javac>
</target>

For Java 1.5 or above, I need to add -Xlint option for javac
Please tell me how to do that. I am still learning build.xml
from O'Reilly's Ant book.

Thank Q!
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

RC said:
I have a very simple section of ant's build.xml file
for javac

<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.prod.dir}">
<classpath refid="project.classpath"/>
</javac>
</target>

For Java 1.5 or above, I need to add -Xlint option for javac
Please tell me how to do that. I am still learning build.xml
from O'Reilly's Ant book.

Try:

http://bobcat.webappcabaret.net/javachina/faq/ant_01.htm#ant_mid_Q100

Arne
 
G

Greg R. Broderick

I have a very simple section of ant's build.xml file
for javac

<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.prod.dir}">
<classpath refid="project.classpath"/>
</javac>
</target>

For Java 1.5 or above, I need to add -Xlint option for javac
Please tell me how to do that. I am still learning build.xml
from O'Reilly's Ant book.

Use the compilerarg task subelement, c.f.
<http://ant.apache.org/manual/index.html>.

cheers

--
---------------------------------------------------------------------
Greg R. Broderick (e-mail address removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top