ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Warnings for javac on console
Date Fri, 24 Jul 2009 14:56:03 GMT
On Fri, Jul 24, 2009 at 9:14 AM, Kamal Chandana Mettananda <lkamal@gmail.com
> wrote:

> Hi,
>
> There are options to enable it.
>
> Use verbose=true and debug="on" attributes to see outputs.
>
> For example;
>
> <javac srcdir="${src.dir}" destdir="${build.dir}" verbose="true"
> debug="on">
>    <classpath refid="project.classpath" />
> </javac>
>
>
One of the things I do is setup my <javac> task to always set these via
properties:

<property name="build.properties.file" value="${basedir}/build.properties"/>
<property file="${build.properties.file}"/>
<property name="javac.verbose.flag" value="false"/>
<property name="javac.debug.flag" value="false"/>
<property name="javac.debug.level" value="lines,var,source"/>
<property name="javac.deprecation.flag" value="false"/>
<property name="javac.verbose.flag" value="false"/>
<property name="javac.listfiles.flag" value="false"/>


<javac srcdir="${srcdir}"
   destdir="${destdir}"
   classpathrer="class.path"
   verbose="${javac.verbose.flag}"
   debug="${javac.debug.flag}"
   debuglevel="${javac.debug.level}"
   deprecation="${javac.deprecation.flag}"
   listfiles="${javac.listfiles.flag}"/>

This setup allows me to create a build.properties file with different
settings. For example, I could set the debug and verbose stuff inside my
build.properties file:

javac.verbose.flag=true
javac.debug.flag=true
javac.deprecation.flag=true

This way, I can turn features on and off in my build.xml file's <javac> task
without having to modify the build.xml file itself.

-- 
David Weintraub
qazwart@gmail.com

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