ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Mariën <Sven.Mar...@vlafo.be>
Subject RE: switch off the warnings in javac
Date Fri, 25 Apr 2003 14:20:22 GMT
Are the warnings you receive deprecation messages ?  You're not
mistaking another message with warnings by any chance? Just tested it
with my script and no probs here, the deprecation messages are
suppressed by the nowarn attribute, which is a façade for the
<compilerarg value="-nowarn"/> tag.

Sven

-----Original Message-----
From: Giovanni Di Lembo [mailto:gdilem@libero.it] 
Sent: donderdag 25 april 2002 16: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%\ejb.jar;%oc4
j_home%\oc4j.jar;%oc4j_home%\oc4jclient.jar;%oc4j_home%\lib\log4j.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-descriptor,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




Mime
View raw message