User: starksm 
  Date: 01/09/26 18:07:05

  Modified:    catalina/src/build build.xml
  Log:
  Update build for new catalina-service.jar
  
  Revision  Changes    Path
  1.3       +171 -32   contrib/catalina/src/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/contrib/catalina/src/build/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 2001/09/14 12:45:00     1.2
  +++ build.xml 2001/09/27 01:07:05     1.3
  @@ -1,51 +1,190 @@
  -<project name="Catalina" default="tomcatservice" basedir="../">
  -  <target name="init">
  -    <tstamp/>
  -    <property name="build.compiler" value="classic"/>
  -    <property name="debug" value="on"/>
  -    <property name="optimize" value="on"/>
  -    <property name="deprecation" value="on"/>
  +<?xml version="1.0" encoding="UTF-8" ?>
  +<!-- $Id: build.xml,v 1.3 2001/09/27 01:07:05 starksm Exp $ -->
   
  -    <property name="src.dir" value="${basedir}/main"/>
  +<!-- An Ant build file for the catalina-service jar and the
  +    JBoss/Tomcat bundle. The buildfile requires a JBoss dist
  +    be specified via the jboss.dist property as well as a
  +    catalina dist be specified via the catalina.dist property.
  +-->
  +
  +<project name="catalina-service" default="jar" basedir="../..">
  +
  +    <!-- Default values for jboss.dist & catalina.dist that should be overriden -->
  +    <property name="jboss.dist" value="${basedir}/../../jboss/dist"/>
  +    <property name="catalina.dist" value="${basedir}/jakarta-tomcat-4.0"/>
  +
  +    <property name="name" value="catalina-service"/>
       <property name="lib.dir" value="${basedir}/lib"/>
  -    <property name="build.dir" value="${basedir}/../build"/>
  +    <property name="src.dir" value="${basedir}/src/main"/>
  +    <property name="src.resources" value="${basedir}/src/resources"/>
  +    <property name="etc.dir" value="${basedir}/src/etc"/>
  +    <property name="build.dir" value="${basedir}/build"/>
       <property name="build.classes.dir" value="${build.dir}/classes"/>
  -    <property name="dist.dir" value="${basedir}/../dist"/>
  -
  -    <property file="${basedir}/build/build.properties"/>
  -
  -    <property name="classpath" 
value="${tomcat.home}/bin/bootstrap.jar;${tomcat.home}/server/lib/catalina.jar;${tomcat.home}/server/lib/crimson.jar;${tomcat.home}/server/lib/jaxp.jar;${jboss.home}/lib/ext/jboss.jar;${jboss.home}/lib/jmxri.jar;${jboss.home}/lib/ext/log4j.jar;${tomcat.home}/common/lib/servlet.jar"/>
  -    <echo message="${classpath}"/>
  +    <property name="jar.file" value="${name}.jar"/>
  +    <property name="test.client" value="tomcat-test"/>
  +    <property name="bundle.name" value="JBoss-2.4.1_Tomcat-4.0" />
  +    <property name="bundle.dir" value="bundle" />
  +    <property name="bundle.root" value="${bundle.dir}/${bundle.name}" />
  +    <path id="base.path_24">
  +        <pathelement location="${jboss.dist}/client/jaas.jar"/>
  +        <pathelement location="${jboss.dist}/client/jbosssx-client.jar"/>
  +        <pathelement location="${jboss.dist}/client/jnp-client.jar"/>
  +        <pathelement location="${jboss.dist}/client/jta-spec1_0_1.jar"/>
  +        <pathelement location="${jboss.dist}/lib/jdbc2_0-stdext.jar"/>
  +        <pathelement location="${jboss.dist}/lib/jaxp.jar"/>
  +        <pathelement location="${jboss.dist}/lib/crimson.jar"/>
  +        <pathelement location="${jboss.dist}/lib/jmxri.jar"/>
  +        <pathelement location="${jboss.dist}/lib/jboss-jaas.jar"/>
  +        <pathelement location="${jboss.dist}/lib/ext/jboss-j2ee.jar"/>
  +        <pathelement location="${jboss.dist}/lib/ext/jboss.jar"/>
  +        <pathelement location="${jboss.dist}/lib/ext/jbosssx.jar"/>
  +        <pathelement location="${jboss.dist}/lib/ext/log4j.jar"/>
  +        <pathelement location="${catalina.dist}/server/lib/catalina.jar"/>
  +        <pathelement location="${catalina.dist}/common/lib/servlet.jar"/>
  +        <pathelement location="${build.classes.dir}"/>
  +    </path>
  +
  +
  +    <target name="init">
  +        <available property="classpath_id" value="base.path_24" 
file="${jboss.dist}/client/jboss-j2ee.jar" />
  +        <property name="classpath" refid="${classpath_id}" />
  +        <echo message="Using jboss.dist=${jboss.dist}" />
  +        <echo message="Using catalina.dist=${catalina.dist}" />
  +        <echo message="Using classpath=${classpath}" />
  +    </target>
  +
  +
  +    <!-- =================================================================== -->
  +    <!-- Prepares the build directory                                        -->
  +    <!-- =================================================================== -->
  +    <target name="prepare" depends="init">
  +        <mkdir dir="${build.dir}"/>
  +    </target>
  +
  +
  +    <!-- =================================================================== -->
  +    <!-- Compiles the source code                                            -->
  +    <!-- =================================================================== -->
  +    <target name="compile" depends="prepare">
  +        <mkdir dir="${build.classes.dir}"/>
  +        <javac srcdir="${src.dir}"
  +               destdir="${build.classes.dir}"
  +               classpath="${classpath}"
  +               debug="on"
  +               deprecation="on"
  +               optimize="off"
  +        >
  +           <include name="org/jboss/web/catalina/**" />
  +           <include name="org/jboss/test/**" />
  +        </javac>
  +    </target>
  +
  +
  +  <!-- =================================================================== -->
  +  <!-- Creates the jar archive                                             -->
  +  <!-- =================================================================== -->
  +  <target name="jar" depends="compile">
  +     <jar jarfile="${build.dir}/${jar.file}"
  +          basedir="${build.classes.dir}"
  +     >
  +          <include name="org/jboss/web/catalina/**"/>
  +          <include name="*.dtd"/>
  +     </jar>
     </target>
   
     <!-- =================================================================== -->
  -  <!-- Prepares the build directory                                        -->
  +  <!-- Installs the jar archive to ${jboss.dist}/lib/ext                   -->
     <!-- =================================================================== -->
  -  <target name="prepare" depends="init">
  -    <mkdir dir="${build.classes.dir}"/>
  +  <target name="install" depends="jar">
  +     <copy file="${build.dir}/${jar.file}"
  +               tofile="${jboss.dist}/lib/ext/${jar.file}"
  +     />
     </target>
   
     <!-- =================================================================== -->
  -  <!-- Compiles the source directory                                       -->
  +  <!-- Creates a jboss-catalina bundle using the jboss.dist and catalina.dist
  +       contents and ${etc.dir}/conf/catalina patch files                     -->
     <!-- =================================================================== -->
  -  <target name="compile" depends="prepare">
  -    <javac srcdir="${src.dir}"
  -           destdir="${build.classes.dir}"
  -           debug="${debug}"
  -          classpath="${classpath}"
  -           optimize="${optimize}"/>
  +  <target name="bundle" depends="jar,client">
  +    <mkdir dir="${bundle.root}" />
  +    <copy todir="${bundle.root}/catalina">
  +      <fileset dir="${catalina.dist}" />
  +    </copy>
  +    <copy todir="${bundle.root}/jboss">
  +      <fileset dir="${jboss.dist}" />
  +    </copy>
  +    <copy todir="${bundle.root}/jboss/lib/ext" file="${build.dir}/${jar.file}" />
  +    <copy todir="${bundle.root}/jboss/conf/catalina">
  +      <fileset dir="${bundle.root}/jboss/conf/default" />
  +    </copy>
  +    <patch patchfile="${etc.dir}/conf/catalina/jboss.conf.patch"
  +      originalfile="${bundle.root}/jboss/conf/catalina/jboss.conf" />
  +    <patch patchfile="${etc.dir}/conf/catalina/jboss.jcml.patch"
  +      originalfile="${bundle.root}/jboss/conf/catalina/jboss.jcml" />
  +    <echo file="${bundle.root}/jboss/bin/run_with_catalina.sh">#!/bin/sh
  +JBOSS_CLASSPATH=$$JBOSS_CLASSPATH:$$JAVA_HOME/lib/tools.jar
  +export JBOSS_CLASSPATH
  +/bin/sh ./run.sh catalina
  +    </echo>
  +    <echo file="${bundle.root}/jboss/bin/run_with_catalina.bat">@echo off
  +set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
  +.\run.bat catalina
  +    </echo>
  +    <fixcrlf srcdir="${bundle.root}/jboss/bin" cr="remove" eof="remove"
  +      includes="*.sh" />
  +    <chmod dir="${bundle.root}/jboss/bin" perm="ugo+rx" includes="*.sh" />
  +    <fixcrlf srcdir="${bundle.root}/jboss/bin" cr="add" eof="remove"
  +      includes="*.bat" />
  +    <copy file="${build.dir}/${test.client}.ear"
  +      tofile="${bundle.root}/jboss/deploy/${test.client}.ear" />
  +  </target>
  +
  +  <target name="bundle.zip" depends="bundle">
  +    <zip zipfile="${bundle.name}.zip" basedir="${bundle.dir}" />
  +  </target>
  +
  +  <target name="bundle.tgz" depends="bundle,client">
  +    <tar tarfile="${bundle.name}.tar" basedir="${bundle.dir}" />
  +    <gzip src="${bundle.name}.tar" zipfile="${bundle.name}.tgz" />
     </target>
   
     <!-- =================================================================== -->
  -  <!-- Creates the class package                                           -->
  +  <!-- Creates the test client ear file                                    -->
     <!-- =================================================================== -->
  -
  -  <target name="tomcatservice" depends="compile">
  -    <mkdir dir="${dist.dir}"/>
  -    <jar jarfile="${dist.dir}/embedded.jar" basedir="${build.classes.dir}"/>
  +  <target name="client" depends="compile">
  +     <copy todir="${build.classes.dir}">
  +          <fileset dir="${src.resources}/test" />
  +     </copy>
  +     <jar jarfile="${build.classes.dir}/${test.client}.jar"
  +          basedir="${build.classes.dir}"
  +          
includes="org/jboss/test/tomcat/ejb/**,META-INF/ejb-jar.xml,META-INF/jboss.xml"
  +     />
  +     <copy 
todir="${build.classes.dir}/WEB-INF/classes/org/jboss/test/tomcat/servlet" >
  +         <fileset dir="${build.classes.dir}/org/jboss/test/tomcat/servlet" />
  +     </copy>
  +     <!-- copy 
todir="${build.classes.dir}/WEB-INF/classes/org/jboss/test/tomcat/ejb/interfaces" >
  +         <fileset dir="${build.classes.dir}/org/jboss/test/tomcat/ejb/interfaces" />
  +     </copy -->
  +      <jar jarfile="${build.classes.dir}/${test.client}.war"
  +          basedir="${build.classes.dir}"
  +          manifest="${src.resources}/web.mf"
  +          includes="WEB-INF/**,index.html"
  +     />
  +      <jar jarfile="${build.classes.dir}/client.jar"
  +          basedir="${build.classes.dir}"
  +          includes="org/jboss/test/tomcat/ejb/interfaces/**"
  +     />
  +     <jar jarfile="${build.dir}/${test.client}.ear"
  +          basedir="${build.classes.dir}"
  +          
includes="${test.client}.jar,${test.client}.war,client.jar,META-INF/application.xml"
  +     />
     </target>
   
  +  <!-- =================================================================== -->
  +  <!-- Cleans up generated stuff                                           -->
  +  <!-- =================================================================== -->
  +  <target name="clean">
  +    <delete dir="${build.dir}"/>
  +  </target>
   
   </project>
  -
  -<!-- End of file -->
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to