ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SimonRichards...@hbosts.com
Subject RE: switch off the warnings in javac
Date Fri, 25 Apr 2003 14:17:43 GMT
Set

deprecation="off"

Even though it's supposed to default to off?

deprecation: Indicates whether source should be compiled with deprecation information; defaults
to off.

Output from a javac in which I have set this is ...

    [javac] Compiling 1498 source files to <my classes dir>/classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.


But when run with deprecation="on" I get deprecation warnings.


I haven't tried not setting it .. my preferred choice has always been set attributes than
leave them to their default values.

Simon

> -----Original Message-----
> From: Giovanni Di Lembo [mailto:gdilem@libero.it]
> Sent: 25 April 2002 15:00
> To: Ant Users List
> Subject: Re: switch off the warnings in javac
> 
> 
> I've done it but it does not work.
> See that:
> <?xml version="1.0"?>
> 
> <!--This file is created by AntBuilder on Tue May 02 22:41:07 PDT
> 2000-->
> 
>    <!--
> ***************************************************************** -->
>    <!-- INITIALIZATION AND
>         -->
>    <!--
> ***************************************************************** -->
> 
> <project name="Build for OC4J" default="all" basedir=".">
> 
> 
>   <target name="init">
>       <tstamp/>
> 
> 
>       <property name="name"   value="romo"/>
>       <property name="build_dir" value="." />
> 
>       <property name="src_dir" 
> value="c:\Cabos2Romo\Progetto-Romo\romo"
> />
> 
>       <property name="etc_dir" value="${src_dir}\etc\romo" />
>       <property name="EAR_XML" value="${etc_dir}\application.xml" />
>       <property name="work_dir" value="${build_dir}\__work_dir" />
>       <property name="classpath"
> value="${src_dir}\src\ejb;%java_home%\tools.jar;%ant_lib%\ant.
> jar;%ant_l
> ib%\jaxp.jar;\jakarta-ant-1.4.1\lib\crimson.jar;%oc4j_home%\ej
> b.jar;%oc4
> j_home%\oc4j.jar;%oc4j_home%\oc4jclient.jar;%oc4j_home%\lib\lo
> g4j.jar;%o
> c4j_home%\jta.jar" />
>       <property name="src_web_dir" value="${src_dir}\src\web" />
>   </target>
> 
>   <target name="prepare" depends="init">
>       <mkdir dir="${build_dir}" />
>       <mkdir dir="${work_dir}" />
>       <delete dir="${build_dir}\${name}-web"/>
>   </target>
> 
>   <target name="cleanup" depends="init,prepare">
>       <delete dir="${work_dir}"/>
>   </target>
> 
> <!--
>   <target name="all" depends="init,ejb,web-war,startup,ear,cleanup"/>
> -->
>   <target name="all" depends="init,ejb,web-war,ear,cleanup"/>
> 
> 
>    <!--
> ***************************************************************** -->
>    <!-- THE EJB
>             -->
>    <!--
> ***************************************************************** -->
> 
>   <target name="ejb" depends="init,prepare,ejb0" />
> 
>   <target name="ejb0" depends="init,prepare" >
>       <mkdir dir="${work_dir}\ejb" />
>       <mkdir dir="${work_dir}\ejb\META-INF"/>
>       <copy file="${etc_dir}\ejb-jar.xml"
> tofile="${work_dir}\ejb\META-INF\ejb-jar.xml"/>
>       <copy file="${etc_dir}\orion-ejb-jar.xml"
> tofile="${work_dir}\ejb\META-INF\orion-ejb-jar.xml"/>
>       <javac nowarn="true"   srcdir="${src_dir}\src\ejb"
> destdir="${work_dir}\ejb" >
> 
> 
>         <classpath>
>             <fileset dir="c:\oc4j\j2ee\home">
>                 <include name="**/*.jar"/>
>              </fileset>
>             <pathelement path="${classpath}"/>
>             <fileset dir="${build_dir}">
>                  <include name="**/*.jar"/>
>              </fileset>
>         </classpath>
>       </javac>
>       <jar jarfile="${build_dir}\romo-ejb.jar"
> basedir="${work_dir}\ejb"/>
>       <delete dir="${work_dir}\ejb"/>
>   </target>
> 
> 
>    <!--
> ***************************************************************** -->
>    <!--
>         -->
>    <!--
> ***************************************************************** -->
> 
>  <target name="startup" depends="init,prepare" >
>       <mkdir dir="${work_dir}\startup" />
>       <javac nowarn="true" srcdir=".\src\startup"
> destdir="${work_dir}\startup" >
> 
>          <classpath>
>   <pathelement path="${classpath}"/>
>   <fileset dir="c:\oc4j\j2ee\home">
>    <include name="**/*.jar"/>
>   </fileset>
>   <fileset dir="${build_dir}">
>    <include name="**/*.jar"/>
>   </fileset>
>         </classpath>
>       </javac>
>       <jar jarfile="${build_dir}\lib\startup-lib.jar"
> basedir="${work_dir}\startup"/>
>       <delete dir="${work_dir}\startup"/>
>   </target>
> 
> 
>    <!--
> ***************************************************************** -->
>    <!--
>        -->
>    <!--
> ***************************************************************** -->
> 
>  <target name="taglib" depends="init,prepare" >
>       <mkdir dir="${work_dir}\taglib" />
>       <javac nowarn="true" srcdir="${src_dir}\src\web\taglib"
> destdir="${work_dir}\taglib" >
> 
>          <classpath>
>   <pathelement path="${classpath}"/>
>   <fileset dir="c:\oc4j\j2ee\home">
>    <include name="**/*.jar"/>
>   </fileset>
>   <fileset dir="${build_dir}">
>    <include name="**/*.jar"/>
>   </fileset>
>         </classpath>
>       </javac>
>       <jar jarfile="${build_dir}\lib\romo-taglib.jar"
> basedir="${work_dir}\taglib"/>
>       <delete dir="${work_dir}\taglib"/>
>   </target>
> 
> 
>    <!--
> ***************************************************************** -->
>    <!--
>        -->
>    <!--
> ***************************************************************** -->
> 
>  <target name="struts" depends="init,prepare" >
>       <mkdir dir="${work_dir}\struts" />
>       <javac nowarn="true" srcdir="${src_dir}\src\web\struts"
> destdir="${work_dir}\struts" >
> 
>          <classpath>
>   <pathelement location=".\struts.jar" />
>              <pathelement path="${classpath}"/>
>              <fileset dir="c:\oc4j\j2ee\home">
>                 <include name="**/*.jar"/>
>              </fileset>
>   <fileset dir="${build_dir}">
>      <include name="**/*.jar"/>
>              </fileset>
>   <fileset dir="${build_dir}\lib">
>      <include name="**/*.jar"/>
>              </fileset>
>         </classpath>
>       </javac>
>       <jar jarfile="${build_dir}\lib\romo-struts.jar"
> basedir="${work_dir}\struts"/>
>       <delete dir="${work_dir}\struts"/>
>   </target>
> 
> 
>    <!--
> ***************************************************************** -->
>    <!-- THE Web
>             -->
>    <!--
> ***************************************************************** -->
> 
> 
> <!--
>      <target name="web" depends="init,prepare,taglib,struts" />
> 
> -->
> 
>   <target name="web-applet" depends="init,prepare,taglib,struts">
>       <copy todir="${build_dir}\${name}-web">
>           <fileset dir="${src_web_dir}" includes="**\*.class" />
>       </copy>
>   </target>
>   <target name="web-img" depends="init,prepare,taglib,struts">
>       <copy todir="${build_dir}\${name}-web">
>           <fileset dir="${src_web_dir}" includes="**\*.gif, 
> **\*.jpg" />
>       </copy>
>   </target>
>   <target name="web-js" depends="init,prepare,taglib,struts">
>       <copy todir="${build_dir}\${name}-web">
>           <fileset dir="${src_web_dir}" includes="**\*.js" />
>       </copy>
>   </target>
>   <target name="web-jsp" depends="init,prepare,taglib,struts">
>       <copy todir="${build_dir}\${name}-web">
>           <fileset dir="${src_web_dir}" includes="*.html, 
> *.htm, *.jsp,
> **\*.jsp" />
>       </copy>
>   </target>
>   <target name="web-css" depends="init,prepare,taglib,struts">
>       <copy todir="${build_dir}\${name}-web">
>           <fileset dir="${src_web_dir}" includes="**\*.css" />
>       </copy>
>   </target>
>   <target name="web-descriptor" depends="init,prepare">
>       <copy todir="${build_dir}\${name}-web\WEB-INF">
>           <fileset dir="${etc_dir}" includes="web.xml, tiles-defs.xml,
> validator-rules.xml, validation.xml, struts-config.xml,
> cmd-fe-config.xml, *.tld"/>
>       </copy>
>   </target>
>   <target name="web-jar-rosa" depends="init,prepare">
>       <copy todir="${build_dir}\${name}-web\WEB-INF\lib">
>           <fileset dir=".\lib" includes="aurora_client.jar,
> CORBASource.jar, full_orb.jar, copy-vbjorb.jar, wbApplSicurezza.jar"/>
>       </copy>
>   </target>
>   <target name="web-lib" depends="init,prepare">
>       <copy todir="${build_dir}\${name}-web\WEB-INF\lib">
>           <fileset dir=".\lib" includes="log.jar, struts.jar,
> jakarta-oro.jar, commons*.jar, romo-struts.jar, romo-taglib.jar,
> romo-fe-config.jar"/>
>       </copy>
>   </target>
>   <target name="web-resources" depends="init,prepare">
>       <copy todir="${build_dir}\${name}-web\WEB-INF\classes">
>           <fileset dir="${src_web_dir}" includes="**\*.properties" />
>       </copy>
>   </target>
>   <target name="web-war"
> depends="web-applet,web-img,web-js,web-css,web-jsp,web-descrip
> tor,web-li
> b,web-jar-rosa,web-resources">
>       <jar jarfile="${build_dir}/${name}-web.war">
>           <fileset dir="${build_dir}\${name}-web" includes="**" />
>       </jar>
>   </target>
> 
> 
> 
>    <!--
> ***************************************************************** -->
>    <!-- THE CLIENT
>             -->
>    <!--
> ***************************************************************** -->
> 
>   <target name="client" depends="init,prepare" />
> 
>    <!--
> ***************************************************************** -->
>    <!-- THE complete J2EE
>             -->
>    <!--
> ***************************************************************** -->
> 
>  <target name="ear" depends="init,ejb,web-war,client,prepare">
>       <mkdir dir="${work_dir}\META-INF"/>
>       <copy file="${EAR_XML}"
> tofile="${work_dir}\META-INF\application.xml"/>
>       <copy todir="${work_dir}">
>           <fileset dir="${build_dir}">
>              <patternset id="jar" >
>                  <include name="*.jar"/>
>                  <include name="*.war"/>
>              </patternset>
>           </fileset>
>       </copy>
>       <jar jarfile="${build_dir}\${name}.ear" basedir="${work_dir}"/>
>       <delete dir="${work_dir}"/>
>  </target>
> 
> </project>
> 
> 
> ----- Original Message -----
> From: "Sven Mariƫn" <Sven.Marien@vlafo.be>
> To: "'Ant Users List'" <user@ant.apache.org>
> Sent: Friday, April 25, 2003 3:59 PM
> Subject: RE: switch off the warnings in javac
> 
> 
> > Use the nowarn="true" attribute of the javac task.
> >
> > Sven
> >
> > -----Original Message-----
> > From: Giovanni Di Lembo [mailto:gdilem@libero.it]
> > Sent: donderdag 25 april 2002 15:50
> > To: user@ant.apache.org
> > Subject: switch off the warnings in javac
> >
> > Hi.
> > I'd like to switch off the warnings in javac .How can I do it?
> > Please help
> >
> > 
> ---------------------------------------------------------------------
> > 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
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 

------------------------------------------------------------------------------
For more information on HBOS Treasury Services, please visit http://www.HBOSTS.com

Or for details of our online FX & Deposit services, please go to http://www.HBOSdeal.com

HBOS Treasury Services plc is part of the HBOS Group, which also includes Halifax plc and
Bank of Scotland.
Registered Office: 33 Old Broad Street, London EC2N 1HZ. Registered No. 2692890. Registered
in England.
Regulated by the Financial Services Authority.

The information contained in this message is confidential and is intended for the addressee
only. If you have received this message in error or there are any problems please notify the
originator immediately. The unauthorised use, disclosure, copying or alteration of this message
is strictly forbidden. This mail and any attachments have been scanned for viruses prior to
leaving the HBOS Treasury Services plc network. HBOS Treasury Services plc will not be liable
for direct, special, indirect or consequential damages arising from alteration of the contents
of this message by a third party or as a result of any virus being passed on.

HBOS Treasury Services plc reserves the right to monitor and record e-mail messages sent to
and from this address for the purposes of investigating or detecting any unauthorised use
of its system and ensuring its effective operation.

==============================================================================


Mime
View raw message