User: starksm
Date: 01/12/02 14:07:27
Modified: jetty/src/build Tag: Branch_2_4 build.xml
Log:
Synch up with the tomcat bundle build proceedure
Revision Changes Path
No revision
No revision
1.6.2.2 +157 -113 contrib/jetty/src/build/Attic/build.xml
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/contrib/jetty/src/build/Attic/build.xml,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -r1.6.2.1 -r1.6.2.2
--- build.xml 2001/09/15 13:14:59 1.6.2.1
+++ build.xml 2001/12/02 22:07:27 1.6.2.2
@@ -1,47 +1,71 @@
-<?xml version="1.0"?>
-<!-- $Id: build.xml,v 1.6.2.1 2001/09/15 13:14:59 jules_gosnell Exp $ -->
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- $Id: build.xml,v 1.6.2.2 2001/12/02 22:07:27 starksm Exp $ -->
+<!-- An Ant build file for the jetty-service jar and the
+ JBoss/Jetty bundle. The buildfile requires a JBoss dist
+ be specified via the jboss.dist property as well as a
+ jetty dist be specified via the jetty.dist property.
+-->
<!-- ======================================================================= -->
<!-- jetty contrib build file -->
<!-- ======================================================================= -->
<project name="jetty-service" default="jar" basedir="../..">
- <target name="init">
+ <!-- Default values for jboss.dist & jetty.dist that should be overriden -->
+ <property name="jboss.dist" value="${basedir}/../../jboss/dist"/>
+ <property name="jetty.dist" value="${basedir}/Jetty-3.1.3-1"/>
+ <property name="jetty.jmx" value="${basedir}/JettyExtra-1.0.1/jmx"/>
- <property name="Name" value="jetty-service"/>
+ <property name="Name" value="JBoss-Jetty Service"/>
<property name="name" value="jetty-service"/>
<property name="version" value="0.1"/>
<property name="src.dir" value="${basedir}/src/main"/>
- <property name="lib.dir" value="${basedir}/../tomcat/lib"/>
+ <property name="lib.dir" value="${basedir}/../jetty/lib"/>
<property name="src.resources" value="${basedir}/../tomcat/src/resources"/>
<property name="etc.dir" value="${basedir}/etc"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
-
- <property name="classpath"
value="${lib.dir}/xml.jar;${jboss.home}/lib/jmxri.jar;${jboss.home}/lib/jboss-jaas.jar;${jboss.home}/lib/ext/log4j.jar;${jboss.home}/lib/ext/jboss.jar;${jboss.home}/lib/ext/ejb.jar;${build.classes.dir};${jetty.home}/lib/javax.servlet.jar;${jetty.home}/lib/org.apache.jasper.jar;${jetty.home}/lib/com.sun.net.ssl.jar;${jetty.home}/lib/org.mortbay.jetty.jar;${jetty.jmx}/lib/org.mortbay.jetty.jmx.jar"/>
-
- <property name="jar.file" value="${name}.jar"/>
- <property name="test.client" value="tomcat-test"/>
-
+ <property name="bundle.name" value="JBoss-2.4.4_Jetty-3.1.3-1" />
+ <property name="bundle.dir" value="bundle" />
+ <property name="bundle.root" value="${bundle.dir}/${bundle.name}" />
+ <property name="jar.file" value="${name}.jar"/>
+ <property name="test.client" value="tomcat-test"/>
<property name="build.compiler" value="classic"/>
- <echo message="jboss.home=${jboss.home}" />
- <echo message="jetty.home=${jetty.home}" />
- <echo message="jetty.jmx=${jetty.jmx}" />
- <echo message="classpath=${classpath}" />
- </target>
+ <path id="base.path">
+ <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="${jetty.dist}/lib/javax.servlet.jar"/>
+ <pathelement location="${jetty.jmx}/lib/org.mortbay.jetty.jmx.jar"/>
+ <pathelement location="${jetty.dist}/lib/org.mortbay.jetty.jar"/>
+ <pathelement location="${build.classes.dir}"/>
+ </path>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
- <target name="prepare" depends="init">
+ <target name="prepare">
+ <available property="classpath_id" value="base.path"
file="${jboss.dist}/client/jboss-j2ee.jar" />
+ <property name="classpath" refid="${classpath_id}" />
<mkdir dir="${build.dir}"/>
-<!--
- <copy file="${src.resources}/jboss-web.dtd"
tofile="${build.classes.dir}/jboss-web.dtd"/>
- -->
+ <echo message="jboss.dist=${jboss.dist}" />
+ <echo message="jetty.dist=${jetty.dist}" />
+ <echo message="jetty.jmx=${jetty.jmx}" />
+ <echo message="classpath=${classpath}" />
</target>
@@ -60,106 +84,61 @@
/>
</target>
+ <target name="create-manifest">
+ <echo file="${build.dir}/version.mf"
+ append="false">Specification-Title: ${Name}-${version}
+Specification-Version: ${version}
+Specification-Vendor: JBoss Group, LLC
+Implementation-Title: ${Name}-${version} CVSTag=${version-tag}
+Implementation-Version: ${release}.${build.time}
+Implementation-Vendor: JBoss Group, LLC
+ </echo>
+ <fixcrlf srcdir="${build.dir}" includes="version.mf" eol="crlf" />
+ </target>
<!-- =================================================================== -->
<!-- Creates the jar archive -->
<!-- =================================================================== -->
<target name="jar" depends="compile">
+ <antcall target="create-manifest" />
<jar jarfile="${jar.file}"
basedir="${build.classes.dir}"
+ manifest="${build.dir}/version.mf"
includes="org/jboss/jetty/**,*.dtd"
/>
</target>
- <!-- =================================================================== -->
- <!-- Installs the jar archive to jboss (and javac for JSPs) -->
- <!-- =================================================================== -->
- <target name="install" depends="jar">
- <copy
- file="${jar.file}"
- tofile="${jboss.home}/lib/ext/${jar.file}"
- />
- <copy
- file="${lib.dir}/javac.jar"
- tofile="${jboss.home}/lib/ext/javac.jar"
- />
- </target>
-
- <!-- =================================================================== -->
- <!-- Cleans up generated stuff -->
- <!-- =================================================================== -->
- <target name="clean" depends="init">
- <delete dir="${build.dir}"/>
- <delete file="${jar.file}"/>
- <delete file="${test.client}.ear"/>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Creates the test client ear file -->
- <!-- =================================================================== -->
- <target name="client" depends="compile">
- <javac srcdir="${basedir}/../tomcat/src/main/"
- destdir="${build.classes.dir}"
- classpath="${classpath}"
- debug="on"
- deprecation="on"
- optimize="off"
- includes="org/jboss/test/**"
- />
- <copydir src="${src.resources}/test" dest="${build.classes.dir}"/>
- <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"
- />
- <copydir src="${build.classes.dir}/org/jboss/test/tomcat/servlet"
-
dest="${build.classes.dir}/WEB-INF/classes/org/jboss/test/tomcat/servlet"/>
- <copydir src="${build.classes.dir}/org/jboss/test/tomcat/ejb/interfaces"
-
dest="${build.classes.dir}/WEB-INF/classes/org/jboss/test/tomcat/ejb/interfaces"/>
- <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="${test.client}.ear"
- basedir="${build.classes.dir}"
-
includes="${test.client}.jar,${test.client}.war,client.jar,META-INF/application.xml"
- />
- </target>
-
<!-- =================================================================== -->
- <!-- builds a JBoss-Jetty distribution -->
+ <!-- Creates a jboss-jetty bundle using the jboss.dist and jetty.dist
+ contents and ${etc.dir}/conf/jetty patch files -->
<!-- =================================================================== -->
-
- <target name="dist" depends="init">
-
- <property name="dist.dir" value="${basedir}/dist"/>
-
- <delete dir="${dist.dir}"/>
- <mkdir dir="${dist.dir}"/>
+ <target name="bundle" depends="jar,client">
+ <mkdir dir="${bundle.root}" />
+ <copy todir="${bundle.root}/jetty">
+ <fileset dir="${jetty.dist}" />
+ </copy>
+ <copy todir="${bundle.root}/jboss">
+ <fileset dir="${jboss.dist}" />
+ </copy>
+ <copy todir="${bundle.root}/jboss/conf/jetty">
+ <fileset dir="${bundle.root}/jboss/conf/default" />
+ </copy>
+ <echo message="copying Jetty JMX from ${jetty.jmx} to ${bundle.root}/jetty-jmx"
/>
+ <copy todir="${bundle.root}/jetty-jmx">
+ <fileset dir="${jetty.jmx}"/>
+ </copy>
- <echo message="copying JBoss from ${jboss.home} to ${dist.dir}/jboss" />
- <copy todir="${dist.dir}/jboss"><fileset dir="${jboss.home}"/></copy>
- <echo message="touching dummy file in ${dist.dir}/jboss/db/jbossmq/" />
- <touch file="${dist.dir}/jboss/db/jbossmq/dummy"/>
- <echo message="copying Jetty from ${jetty.home} to ${dist.dir}/jetty" />
- <copy todir="${dist.dir}/jetty"><fileset dir="${jetty.home}"/></copy>
- <chmod file="${dist.dir}/jetty/cgi-bin/env.sh" perm="+x"/>
- <echo message="copying Jetty JMX from ${jetty.jmx} to ${dist.dir}/jetty-jmx" />
- <copy todir="${dist.dir}/jetty-jmx"><fileset dir="${jetty.jmx}"/></copy>
+ <chmod file="${bundle.dir}/jetty/cgi-bin/env.sh" perm="+x"/>
+ <echo message="copying Jetty JMX from ${jetty.jmx} to ${bundle.dir}/jetty-jmx"
/>
+ <copy todir="${bundle.dir}/jetty-jmx">
+ <fileset dir="${jetty.jmx}"/>
+ </copy>
- <property name="cfg.src" value="${jboss.home}/conf/default"/>
- <property name="cfg.tgt" value="${dist.dir}/jboss/conf/jetty"/>
+ <property name="cfg.src" value="${jboss.dist}/conf/default"/>
+ <property name="cfg.tgt" value="${bundle.root}/jboss/conf/jetty"/>
- <property name="conf.src" value="${cfg.src}/jboss.conf"/>
<property name="conf.tgt" value="${cfg.tgt}/jboss.conf"/>
-
- <property name="jcml.src" value="${cfg.src}/jboss.jcml"/>
<property name="jcml.tgt" value="${cfg.tgt}/jboss.jcml"/>
<delete dir="${cfg.tgt}"/>
@@ -177,9 +156,9 @@
<echo message="adding ${basedir}/src/jetty.properties to ${cfg.tgt}" />
<copy todir="${cfg.tgt}" file="${basedir}/etc/jetty.properties"/>
<echo message="installing README file" />
- <copy todir="${dist.dir}" file="${basedir}/etc/README"/>
+ <copy todir="${bundle.root}" file="${basedir}/etc/README"/>
<echo message="installing VERSION file" />
- <copy todir="${dist.dir}" file="${basedir}/etc/VERSION"/>
+ <copy todir="${bundle.root}" file="${basedir}/etc/VERSION"/>
<echo>
Adding Jetty MLET to jboss.conf
@@ -228,17 +207,82 @@
</replace>
- <antcall target="install">
- <param name="jboss.home" value="${dist.dir}/jboss"/>
- <param name="jetty.home" value="${dist.dir}/jetty"/>
- </antcall>
+ <echo file="${bundle.root}/jboss/bin/run_with_jetty.sh">#!/bin/sh
+JBOSS_CLASSPATH=$$JBOSS_CLASSPATH:$$JAVA_HOME/lib/tools.jar
+export JBOSS_CLASSPATH
+/bin/sh ./run.sh jetty
+ </echo>
+ <echo file="${bundle.root}/jboss/bin/run_with_jetty.bat">@echo off
+set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+.\run.bat jetty
+ </echo>
+ <fixcrlf srcdir="${bundle.root}/jboss/bin" eol="lf" eof="remove"
+ includes="*.sh" />
+ <chmod dir="${bundle.root}/jboss/bin" perm="ugo+rx" includes="*.sh" />
+ <fixcrlf srcdir="${bundle.root}/jboss/bin" eol="crlf" eof="remove"
+ includes="*.bat" />
+ <copy file="${build.dir}/${test.client}.ear"
+ tofile="${bundle.root}/jboss/deploy/${test.client}.ear" />
+ </target>
- <echo>
-Adding run script
- </echo>
- <copy todir="${dist.dir}" file="${basedir}/etc/run.sh"/>
- <chmod file="${dist.dir}/run.sh" perm="ugo+rx"/>
+ <target name="bundle.zip" depends="bundle">
+ <zip zipfile="${bundle.name}.zip" basedir="${bundle.dir}" />
+ </target>
+ <target name="bundle.tgz" depends="bundle">
+ <tar tarfile="${bundle.name}.tar" basedir="${bundle.dir}" />
+ <gzip src="${bundle.name}.tar" zipfile="${bundle.name}.tgz" />
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates the test client ear file -->
+ <!-- =================================================================== -->
+ <target name="client" depends="compile">
+ <javac srcdir="${basedir}/../tomcat/src/main/"
+ destdir="${build.classes.dir}"
+ classpath="${classpath}"
+ debug="on"
+ deprecation="on"
+ optimize="off"
+ includes="org/jboss/test/**"
+ />
+ <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}"/>
+ <delete dir="${bundle.dir}"/>
+ <delete file="${jar.file}"/>
+ <delete file="${test.client}.ear"/>
</target>
</project>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development