avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craft...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/examples build.xml
Date Thu, 04 Jul 2002 11:44:23 GMT
crafterm    2002/07/04 04:44:23

  Modified:    fortress/examples build.xml
  Log:
  Added targets to display a warning if servlet classes are not available.
  
  Revision  Changes    Path
  1.4       +44 -1     jakarta-avalon-excalibur/fortress/examples/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/examples/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml	4 Jul 2002 10:23:59 -0000	1.3
  +++ build.xml	4 Jul 2002 11:44:23 -0000	1.4
  @@ -117,11 +117,54 @@
           </available>
   
       </target>
  +   
  +    <!-- Generic warning target -->
  +    <target name="op-warning" description="General waring target (used by other targets)">
  +      <echo>**********************************************</echo>
  +      <echo>*</echo>
  +      <echo>*  Classes needed for ${thing} examples are not </echo>
  +      <echo>*  available. The example should build without them</echo>
  +      <echo>*</echo>
  +      <echo>*  Recovery:</echo>
  +      <echo>*  ${recovery}</echo>
  +      <echo>*</echo>
  +      <echo>***********************************************</echo>
  +      <echo/>
  +    </target>
  +  
  +    <!-- Target to warn the developer if the servlet classes are not available -->
  +    <target name="servlet-warn" unless="servlet.present"
  +        description="Outputs a warning if javax.servlet.* classes are missing during compilation">
  +      <antcall target="op-warning">
  +        <param name="thing" value="Servlet"/>
  +        <param name="recovery"
  +          value="Run the build target import-servlet-jar and it will download the servlet
api jar - you should be online for that."/>
  +      </antcall>
  +    </target>
   
  +    <target name="import-servlet-jar" description="Imports the servlet API if required">
  +
  +      <mkdir dir="tmp-imports"/>
  +
  +      <property name="jar-version" value="3.2.3"/>
  +
  +      <get src="http://jakarta.apache.org/builds/jakarta-tomcat/release/v${jar-version}/bin/jakarta-servletapi-${jar-version}.zip"
  +          dest="tmp-imports/jakarta-servletapi-${jar-version}.zip"
  +          verbose="true"
  +          usetimestamp="true"/>
  +
  +      <unzip src="tmp-imports/jakarta-servletapi-${jar-version}.zip" dest="tmp-imports"
/>
  +
  +      <copy file="tmp-imports/jakarta-servletapi-${jar-version}/lib/servlet.jar" todir="${lib.dir}"/>
  +
  +      <delete dir="tmp-imports" />
  +
  +    </target>
  + 
       <!-- =================================================================== -->
       <!-- Compiles the source code                                            -->
       <!-- =================================================================== -->
  -    <target name="compile" depends="init">
  +    <target name="compile" depends="init,servlet-warn">
           <mkdir dir="${build.dir}"/>
           <mkdir dir="${build.classes.dir}"/>
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message