When I run the "compile" target of my Ant "build.xml" file, then I get the following message:
Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
My compile target is the following:
<target name="compile"> <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false"> <classpath refid="class.path" /> </javac> <javac srcdir="${test.dir}" destdir="${classes.dir}" debug="true" debuglevel="lines,source" includeantruntime="false"> <classpath refid="class.path" /> </javac> </target>
What do I have to change in my build.xml file so that -Xlint:unchecked is done there?
Create Ant build file In the Project tool window, select the directory, where the build file should be created. Right-click the directory and from the context menu, select New | File ( Alt+Insert ). In the New File dialog, specify the name of the new file with the xml extension, for example, build. xml.
**\*.sql means "in the given directory and inside all of its subdirectories, all the files that end with .sql"
includeAntRuntime. Whether to include the Ant run-time libraries in the classpath. It is usually best to set this to false so the script's behavior is not sensitive to the environment in which it is run. No; defaults to yes , unless build.sysclasspath property is set.
Add the following element in <javac></javac>
section:
<compilerarg value="-Xlint:unchecked" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With