ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "phoenix" <>
Subject Ant with -Xlint:unchecked
Date Sun, 19 Oct 2014 02:47:47 GMT
I use ant 1.9.4 and jdk1.8,my build.xml file is follows:


<?xml version="1.0" encoding="UTF-8" ?>

<project name="demo" default="run" basedir=".">

<property name="src" value="src"/>

<property name="lib" value="src/lib"/>

<property name="dest" value="WEB-INF/classes"/>

<property name="dest_lib" value="WEB-INF"/>

<path id="Third-Part Lib">

         <fileset dir="${lib}">

       <include name="*.jar" />



<target name="init">  

         <mkdir dir="${dest}"/>  


<target name="compile" depends="init">

         <javac srcdir="${src}" destdir="${dest}">

                   <classpath refid="Third-Part Lib"/>



<target name="build" depends="compile">

         <mkdir dir="${dest}"/>

         <javac srcdir="${src}" destdir="${dest}" target="1.8" debug="true"
deprecation="true" optimize="false" failonerror="true"
includeantruntime="false"><compilerarg value="-Xlint:unchecked"/></javac>

         <copy todir="${dest}" preservelastmodified="true">



<target name="run" depends="build">

         <java classname="demo.StudentTest">

                   <classpath refid="Third-Part Lib"/>



<target name="clean">

         <delete dir="${dest}" />  


<target name="rerun" depends="clean,run">  

         <ant target="clean" />  

         <ant target="run" />  




when I use ant build to compile java file,it raise following warning


    [javac] E:\tomcat\webapps\demo\build.xml:17: warning:
'includeantruntime' was not set, defaulting to build.sysclasspath=last; set
to false for repeatable builds

    [javac] Compiling 13 source files to

    [javac] Waring: E:\tomcat\webapps\demo\src\demo\ using
or overwrite old API

[javac] Waring: For detail information, Please use -Xlint:deprecation to


I have used <compilerarg value="-Xlint:unchecked"/> in <javac>, why ant
still raise above information? How can I get which API is old?  I am puzzled
it for several days. How to make -Xlint:deprecation to work? 

PS: How to set 'includeantruntim'?




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message