remm 2002/07/18 17:39:13 Added: . build.properties.sample build.xml download.properties tomcat.nsi resources INSTALLLICENSE config.ini main.ico tickno.bmp tickyes.bmp tomcat.ico uninst.ico resources/confinstall server_1.xml server_2.xml tomcat-users_1.xml tomcat-users_2.xml Log: - Add base code. - Note: doesn't build yet. Revision Changes Path 1.1 jakarta-tomcat-5/build.properties.sample Index: build.properties.sample =================================================================== # ----------------------------------------------------------------------------- # build.properties.sample # # This is an example "build.properties" file, used to customize building Tomcat # for your local environment. It defines the location of all external # modules that Tomcat depends on. Copy this file to "build.properties" # in the top-level source directory, and customize it as needed. # # $Id: build.properties.sample,v 1.1 2002/07/19 00:39:13 remm Exp $ # ----------------------------------------------------------------------------- # ----- Compile Control Flags ----- compile.debug=on compile.deprecation=off compile.optimize=on # ----- Build Control Flags #Build all components #full.dist=on #Build lightweight JDK 1.4 distribution #light.dist=on #Hide configuration flags display #flags.hide=on #Version number version=5.0 #Proxy to download subproject #proxy.host=proxy.domain #proxy.port=8080 #proxy.use=on #CVS root for the jakarta repositories. cvsroot=":pserver:[EMAIL PROTECTED]:/home/cvspublic" # ----- Default Base Path for Dependent Packages ----- base.path=/usr/local # ----- Jakarta Tomcat Connectors source path ----- jtc.home=../../jakarta-tomcat-connectors # ----- Jakarta Tomcat Jasper source path ----- jasper.home=../jakarta-tomcat-jasper/jasper2 # ----- Jakarta Tomcat Catalina source path ----- catalina.home=../jakarta-tomcat-catalina # -------------------------------------------------- # REQUIRED LIBRARIES # -------------------------------------------------- # ----- Commons Beanutils, version 1.1 or later ----- commons-beanutils.home=${base.path}/commons-beanutils-1.3 commons-beanutils.lib=${commons-beanutils.home} commons-beanutils.jar=${commons-beanutils.lib}/commons-beanutils.jar commons-beanutils.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-beanutils/v1.3/commons-beanutils-1.3.tar.gz # ----- Commons Collections, version 1.0 or later ----- commons-collections.home=${base.path}/commons-collections-2.0 commons-collections.lib=${commons-collections.home} commons-collections.jar=${commons-collections.lib}/commons-collections.jar commons-collections.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v2.0/commons-collections-2.0.tar.gz # ----- Commons Digester, version 1.1.1 or later ----- commons-digester.home=${base.path}/commons-digester-1.2 commons-digester.lib=${commons-digester.home} commons-digester.jar=${commons-digester.lib}/commons-digester.jar commons-digester.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1.2/commons-digester-1.2.tar.gz # ----- Commons Logging, version 1.0.1 or later ----- commons-logging.home=${base.path}/commons-logging-1.0.1 commons-logging.lib=${commons-logging.home} commons-logging-api.jar=${commons-logging.lib}/commons-logging-api.jar commons-logging.jar=${commons-logging.lib}/commons-logging.jar commons-logging.loc=jakarta-commons/logging #commons-logging.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-logging/v1.0.1/commons-logging-1.0.1.tar.gz # ----- Java Naming and Directory Interface (JNDI), version 1.2 or later ----- # Note: Optional with JDK 1.3+ jndi.home=${base.path}/jndi-1.2.1 jndi.lib=${jndi.home}/lib jndi.jar=${jndi.lib}/jndi.jar ldap.jar=${jndi.lib}/ldap.jar jaas.jar=${jndi.lib}/jaas.jar # ----- Jakarta Regular Expressions Library, version 1.2 ----- regexp.home=${base.path}/jakarta-regexp-1.2 regexp.lib=${regexp.home} regexp.jar=${regexp.lib}/jakarta-regexp-1.2.jar regexp.loc=http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/jakarta-regexp-1.2.tar.gz # ----- Jakarta Servlet API Classes (Servlet 2.3 / JSP 1.2) ----- servlet.home=${base.path}/jakarta-servletapi-4 servlet.lib=${servlet.home}/lib servlet.jar=${servlet.lib}/servlet.jar servlet.loc=jakarta-servletapi-4 # ----- Xerces XML Parser, version 1.4.4 to 2.0.0 Beta 4 ----- # Note: Optional with JDK 1.4+ #xerces.home=${base.path}/xerces-1_4_4 #xerces.lib=${xerces.home} #xerces.jar=${xerces.lib}/xerces.jar # ----- Xerces XML Parser, version 2.0.0 or later ----- # Note: Optional with JDK 1.4+, or if Xerces 1.x is present xerces.home=${base.path}/xerces-2_0_2 xerces.lib=${xerces.home} xerces.loc=http://xml.apache.org/dist/xerces-j/Xerces-J-bin.2.0.2.tar.gz xercesImpl.jar=${xerces.lib}/xercesImpl.jar xmlParserAPIs.jar=${xerces.lib}/xmlParserAPIs.jar # -------------------------------------------------- # OPTIONAL LIBRARIES # -------------------------------------------------- # ----- Java Activation Framework (JAF), version 1.0.1 or later ----- activation.home=${base.path}/jaf-1.0.1 activation.lib=${activation.home} activation.jar=${activation.lib}/activation.jar # ----- Commons Daemon, version 20020219 or later ----- commons-daemon.home=${base.path}/commons-daemon commons-daemon.lib=${commons-daemon.home} commons-daemon.jar=${commons-daemon.lib}/commons-daemon.jar commons-daemon.loc=jakarta-commons-sandbox/daemon # ----- Commons DBCP, version 20011030 or later ----- commons-dbcp.home=${base.path}/commons-dbcp commons-dbcp.lib=${commons-dbcp.home} commons-dbcp.jar=${commons-dbcp.lib}/commons-dbcp.jar commons-dbcp.loc=jakarta-commons/dbcp # ----- Commons Modeler, version 1.0 or later ----- commons-modeler.home=${base.path}/commons-modeler-1.0 commons-modeler.lib=${commons-modeler.home} commons-modeler.jar=${commons-modeler.lib}/commons-modeler.jar commons-modeler.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-modeler/v1.0/commons-modeler-1.0.tar.gz # ----- Commons Pool, version 1.0 or later ----- commons-pool.home=${base.path}/commons-pool-1.0 commons-pool.lib=${commons-pool.home} commons-pool.jar=${commons-pool.lib}/commons-pool.jar commons-pool.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-pool/v1.0/commons-pool-1.0.tar.gz # ----- JavaService, version 1.2.0 or later ----- javaservice.home=${base.path}/javaservice javaservice.loc=http://www.alexandriasc.com/software/JavaService/JavaService-bin-1.2.0.zip # ----- Java Database Connectivity (JDBC) Optional Package, version 2.0 ----- jdbc20ext.home=${base.path}/jdbc2_0-stdext jdbc20ext.lib=${jdbc20ext.home} jdbc20ext.jar=${jdbc20ext.lib}/jdbc2_0-stdext.jar # ----- Java Management Extensions (JMX), JMX RI 1.0.1 or later or MX4J 1.1 or later ----- jmx.home=${base.path}/mx4j-1.1 jmx.lib=${jmx.home}/lib jmx.jar=${jmx.lib}/mx4j-jmx.jar jmx.loc=http://telia.dl.sourceforge.net/sourceforge/mx4j/mx4j-1.1.tar.gz # ----- Java Secure Sockets Extension (JSSE), version 1.0.2 or later ----- jsse.home=${base.path}/jsse-1.0.2 jsse.lib=${jsse.home}/lib jcert.jar=${jsse.lib}/jcert.jar jnet.jar=${jsse.lib}/jnet.jar jsse.jar=${jsse.lib}/jsse.jar # ----- Java Transaction API (JTA), version 1.0.1 or later ----- jta.home=${base.path}/jta-spec1_0_1 jta.lib=${jta.home} jta.jar=${jta.lib}/jta-spec1_0_1.jar # ----- JUnit Unit Test Suite, version 3.7 or later ----- junit.home=${base.path}/junit3.7 junit.lib=${junit.home} junit.jar=${junit.lib}/junit.jar junit.loc=http://download.sourceforge.net/junit/junit3.7.zip # ----- Java Mail, version 1.2 or later ----- mail.home=${base.path}/javamail-1.2 mail.lib=${mail.home} mail.jar=${mail.lib}/mail.jar # ----- NSIS, version 1.90 or later ----- nsis.home=${base.path}/nsis nsis.loc=http://www.nullsoft.com/free/nsis/nsis198.exe # ----- PureTLS Extension, version 0.9 or later ----- puretls.home=${base.path}/puretls-0.9b2 puretls.lib=${puretls.home}/build puretls.jar=${puretls.lib}/puretls.jar # ----- Struts, version 1.0.1 or later ----- struts.home=${base.path}/jakarta-struts-1.0.2 struts.lib=${struts.home}/lib struts.jar=${struts.lib}/struts.jar struts.loc=http://jakarta.apache.org/builds/jakarta-struts/release/v1.0.2/jakarta-struts-1.0.2.tar.gz # ----- Tyrex Data Source, version 1.0 ----- tyrex.home=${base.path}/tyrex-1.0 tyrex.lib=${tyrex.home} tyrex.jar=${tyrex.lib}/tyrex-1.0.jar tyrex.loc=ftp://ftp.exolab.org/pub/tyrex/tyrex-1.0/tyrex-1.0.jar 1.1 jakarta-tomcat-5/build.xml Index: build.xml =================================================================== <project name="Tomcat 5.0" default="deploy" basedir="."> <!-- ===================== Initialize Property Values =================== --> <!-- See "build.properties.sample" in the top level directory for all --> <!-- property values you must customize for successful building!!! --> <property file="download.properties"/> <property file="build.properties"/> <property file="${user.home}/build.properties"/> <!-- Project Properties --> <property name="name" value="Apache Tomcat" /> <property name="year" value="2002" /> <property name="version" value="5.0" /> <property name="project" value="jakarta-tomcat" /> <property name="final.name" value="${project}-${version}" /> <property name="final-src.name" value="${project}-${version}-src" /> <property name="jtc.project" value="jakarta-tomcat-connectors" /> <property name="jtc.final.name" value="${jtc.project}-${version}" /> <property name="jtc.final-src.name" value="${jtc.project}-${version}-src" /> <!-- Build Defaults --> <property name="catalina.build" value="${catalina.home}/build"/> <property name="jasper.build" value="${jasper.home}/build"/> <property name="javaservice.home" value="../javaservice"/> <property name="nsis.home" value="c:\program files\nsis"/> <property name="servlet.home" value="../jakarta-servletapi-4/dist"/> <property name="tomcat.build" value="${basedir}/build"/> <property name="tomcat.dist" value="${basedir}/dist"/> <property name="webapps.build" value="${catalina.home}/webapps/build"/> <property name="webapps.dist" value="${catalina.home}/webapps/dist"/> <!-- Source dependencies --> <property name="catalina.home" value="${basedir}/../jakarta-tomcat-catalina"/> <property name="jasper.home" value="${basedir}/../jakarta-tomcat-jasper/jasper2"/> <property name="jtc.home" value="${basedir}/../jakarta-tomcat-connectors"/> <!-- =================== DETECT: Display configuration ================== --> <target name="detect" description="Display configuration and conditional compilation flags"> <ant dir="${catalina.home}" target="flags.display"/> <ant dir="${basedir}/webapps/admin" target="flags.display"/> </target> <!-- ===================== DEPLOY: Create Directories =================== --> <target name="deploy-prepare"> <mkdir dir="${tomcat.build}"/> </target> <!-- ====================== DEPLOY: Copy Static Files =================== --> <target name="deploy-static" depends="deploy-prepare"/> <!-- ====================== DEPLOY: Deploy Components =================== --> <target name="deploy" depends="deploy-static" description="Build and deploy all components"> <echo>Target: Catalina - Deploy ...</echo> <ant dir="${catalina.home}" target="deploy"/> <echo>Target: Jasper - Deploy ...</echo> <ant dir="${jasper.home}" target="deploy"> <property name="catalina.home" value="${tomcat.build}"/> </ant> </target> <!-- ====================== COMBO: Clean All Directories ================ --> <target name="clean" description="Clean all components"> <delete dir="${tomcat.build}"/> <echo>Target: Catalina - Clean ...</echo> <ant dir="${catalina.home}" target="clean"/> <echo>Target: Jasper - Clean ...</echo> <ant dir="${jasper.home}" target="clean"> <property name="catalina.home" value="${tomcat.build}"/> </ant> <delete dir="${tomcat.dist}"/> </target> <!-- ======================= COMBO: Build All Components ================ --> <target name="all" description="Clean, build, and deploy all components"> <echo>Target: Catalina - All ...</echo> <ant dir="${catalina.home}" target="all"/> <echo>Target: Jasper - All ...</echo> <ant dir="${jasper.home}" target="all"> <property name="catalina.home" value="${tomcat.build}"/> </ant> </target> <!-- ======================= COMBO: Test All Components ================= --> <target name="test" description="Unit tests on all components"> <echo>Target: Catalina - Test ...</echo> <ant dir="${catalina.home}" target="test"/> <echo>Target: Jasper - Test ...</echo> <ant dir="${jasper.home}" target="test"> <property name="catalina.home" value="${tomcat.build}"/> </ant> </target> <!-- ====================== DIST: Create Directories ==================== --> <target name="dist-prepare"> <mkdir dir="${tomcat.dist}"/> <mkdir dir="${tomcat.dist}/bin"/> <mkdir dir="${tomcat.dist}/common"/> <mkdir dir="${tomcat.dist}/common/classes"/> <mkdir dir="${tomcat.dist}/common/endorsed"/> <mkdir dir="${tomcat.dist}/common/lib"/> <mkdir dir="${tomcat.dist}/conf"/> <mkdir dir="${tomcat.dist}/logs"/> <mkdir dir="${tomcat.dist}/server"/> <mkdir dir="${tomcat.dist}/server/classes"/> <mkdir dir="${tomcat.dist}/server/lib"/> <mkdir dir="${tomcat.dist}/shared/classes"/> <mkdir dir="${tomcat.dist}/shared/lib"/> <mkdir dir="${tomcat.dist}/webapps"/> <mkdir dir="${tomcat.dist}/work"/> <mkdir dir="${tomcat.dist}/temp"/> </target> <!-- ====================== DIST: Copy Static Files ===================== --> <target name="dist-static" depends="dist-prepare"> <!-- Copy the top-level documentation files --> <copy todir="${tomcat.dist}"> <fileset dir="."> <include name="LICENSE"/> <include name="INSTALLING.txt"/> <include name="BUILDING.txt"/> <include name="README.txt"/> <include name="RELEASE*"/> <include name="RUNNING.txt"/> </fileset> </copy> <!-- Copy the contents of each "build" directory --> <copy todir="${tomcat.dist}/bin"> <fileset dir="${tomcat.build}/bin" /> </copy> <copy todir="${tomcat.dist}/common/classes"> <fileset dir="${tomcat.build}/common/classes" /> </copy> <copy todir="${tomcat.dist}/common/endorsed"> <fileset dir="${tomcat.build}/common/endorsed" /> </copy> <copy todir="${tomcat.dist}/common/lib"> <fileset dir="${tomcat.build}/common/lib" /> </copy> <copy todir="${tomcat.dist}/conf"> <fileset dir="${tomcat.build}/conf" /> </copy> <copy todir="${tomcat.dist}/server/classes"> <fileset dir="${tomcat.build}/server/classes" /> </copy> <copy todir="${tomcat.dist}/server/lib"> <fileset dir="${tomcat.build}/server/lib" /> </copy> <copy todir="${tomcat.dist}/server/webapps"> <fileset dir="${tomcat.build}/server/webapps" /> </copy> <copy todir="${tomcat.dist}/shared/classes"> <fileset dir="${tomcat.build}/shared/classes" /> </copy> <copy todir="${tomcat.dist}/shared/lib"> <fileset dir="${tomcat.build}/shared/lib" /> </copy> <copy todir="${tomcat.dist}/webapps"> <fileset dir="${tomcat.build}/webapps" /> </copy> <!-- Correct permissions and line endings on "bin" scripts --> <fixcrlf srcdir="${tomcat.dist}/bin" includes="*.sh" eol="lf"/> <fixcrlf srcdir="${tomcat.dist}/bin" includes="*.bat" eol="crlf"/> <chmod dir="${tomcat.dist}/bin" includes="*.sh" perm="+x"/> </target> <!-- ====================== DIST: Create Javadoc ======================== --> <target name="dist-javadoc"> <ant dir="${catalina.home}" target="javadoc"/> <mkdir dir="${tomcat.dist}/webapps/tomcat-docs/catalina/docs/api"/> <copy todir="${tomcat.dist}/webapps/tomcat-docs/catalina/docs/api"> <fileset dir="${catalina.build}/javadoc" /> </copy> <ant dir="${jasper.home}" target="javadoc"/> <mkdir dir="${tomcat.dist}/webapps/tomcat-docs/jasper/docs/api"/> <copy todir="${tomcat.dist}/webapps/tomcat-docs/jasper/docs/api"> <fileset dir="${jasper.build}/javadoc" /> </copy> <mkdir dir="${tomcat.dist}/webapps/tomcat-docs/servletapi"/> <copy todir="${tomcat.dist}/webapps/tomcat-docs/servletapi"> <fileset dir="${servlet.home}/docs/api" /> </copy> </target> <!-- ====================== DIST: Create Sources ======================== --> <target name="dist-source"> <mkdir dir="${tomcat.dist}/src"/> <copy todir="${tomcat.dist}/src"> <fileset dir="${basedir}"> <exclude name="**/build/**"/> <exclude name="**/dist/**"/> <exclude name="jasper/**"/> <exclude name="build.properties"/> </fileset> </copy> <mkdir dir="${tomcat.dist}/src/jasper"/> <copy todir="${tomcat.dist}/src/jasper"> <fileset dir="${jasper.home}"/> </copy> <mkdir dir="${tomcat.dist}/jtc-src"/> <copy todir="${tomcat.dist}/jtc-src"> <fileset dir="${jtc.home}"> <exclude name="coyote/build/**"/> <exclude name="http11/build/**"/> <exclude name="jk/build/**"/> <exclude name="util/build/**"/> <exclude name="webapp/build/**"/> <exclude name="build.properties"/> </fileset> </copy> </target> <!-- ====================== DIST: Create Archives ======================= --> <target name="dist" depends="deploy,dist-static,dist-javadoc" description="Create binary distribution"> </target> <!-- ================= DIST: Create Windows Installer =================== --> <target name="installer" description="Create Windows installer" if="execute.installer"> <echo message="Builds a Windows installer based on Nullsoft Installer"/> <echo message="NSIS must be installed in the default directory"/> <copy todir="${tomcat.dist}"> <fileset dir="resources" /> </copy> <copy file="${nsis.home}/InstallOptions.dll" todir="${tomcat.dist}" /> <copy file="${javaservice.home}/bin/JavaService.exe" tofile="${tomcat.dist}/bin/tomcat.exe" /> <filter token="VERSION" value="${version}"/> <copy file="tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi" filtering="true"/> <exec dir="${tomcat.dist}" executable="${nsis.home}\makensis-bz2.exe"> <arg value="tomcat.nsi" /> </exec> <move file="${tomcat.dist}/tomcat4.exe" tofile="${tomcat.dist}/${final.name}.exe" /> </target> <!-- ==================== RELEASE: Create Release ======================= --> <target name="release" depends="prepare-release,clean,dist,dist-source,installer,package-zip,package-tgz,package-src-zip,package-src-tgz" description="Create a Tomcat 4 packaged distribution" /> <target name="package-zip"> <zip zipfile="${tomcat.dist}/${final.name}.zip"> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="bin/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="common/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="conf/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="logs/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="server/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="shared/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="webapps/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="work/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="temp/**" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="LICENSE" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="README.txt" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="RELEASE-NOTES-*" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="RELEASE-PLAN-*" /> <zipfileset dir="${tomcat.dist}" prefix="${final.name}" includes="RUNNING.txt" /> </zip> </target> <target name="prepare-release"> <condition property="execute.installer"> <and> <os family="windows" /> <available file="${javaservice.home}/bin/JavaService.exe" /> <available file="${nsis.home}/makensis-bz2.exe" /> </and> </condition> </target> <target name="package-tgz"> <mkdir dir="${tomcat.dist}/${final.name}" /> <copy todir="${tomcat.dist}/${final.name}"> <fileset dir="${tomcat.dist}"> <include name="bin/**" /> <include name="common/**" /> <include name="conf/**" /> <include name="logs/**" /> <include name="server/**" /> <include name="shared/**" /> <include name="webapps/**" /> <include name="work/**" /> <include name="temp/**" /> <include name="LICENSE" /> <include name="README.txt" /> <include name="RELEASE-NOTES-*" /> <include name="RELEASE-PLAN-*" /> <include name="RUNNING.txt" /> </fileset> </copy> <fixcrlf srcdir="${tomcat.dist}/${final.name}" includes="*.txt,LICENSE" eol="lf"/> <fixcrlf srcdir="${tomcat.dist}/${final.name}/conf" eol="lf"/> <tar longfile="gnu" tarfile="${tomcat.dist}/${final.name}.tar"> <tarfileset dir="${tomcat.dist}" mode="755"> <include name="${final.name}/bin/catalina.sh" /> <include name="${final.name}/bin/digest.sh" /> <include name="${final.name}/bin/jasper.sh" /> <include name="${final.name}/bin/jspc.sh" /> <include name="${final.name}/bin/setclasspath.sh" /> <include name="${final.name}/bin/startup.sh" /> <include name="${final.name}/bin/shutdown.sh" /> <include name="${final.name}/bin/tool-wrapper.sh" /> </tarfileset> <tarfileset dir="${tomcat.dist}"> <include name="${final.name}/**" /> <exclude name="${final.name}/bin/catalina.sh" /> <exclude name="${final.name}/bin/digest.sh" /> <exclude name="${final.name}/bin/jasper.sh" /> <exclude name="${final.name}/bin/jspc.sh" /> <exclude name="${final.name}/bin/setclasspath.sh" /> <exclude name="${final.name}/bin/startup.sh" /> <exclude name="${final.name}/bin/shutdown.sh" /> <exclude name="${final.name}/bin/tool-wrapper.sh" /> </tarfileset> </tar> <delete dir="${tomcat.dist}/${final.name}" /> <gzip zipfile="${tomcat.dist}/${final.name}.tar.gz" src="${tomcat.dist}/${final.name}.tar"/> <delete file="${tomcat.dist}/${final.name}.tar" /> </target> <target name="package-src-zip"> <!-- Package Tomcat Source --> <zip zipfile="${tomcat.dist}/${final-src.name}.zip"> <zipfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" /> </zip> <!-- Package JTC Source --> <zip zipfile="${tomcat.dist}/${jtc.final-src.name}.zip"> <zipfileset dir="${tomcat.dist}/jtc-src" prefix="${jtc.final-src.name}" /> </zip> </target> <target name="package-src-tgz"> <!-- Package Tomcat Source --> <mkdir dir="${tomcat.dist}/${final-src.name}" /> <copy todir="${tomcat.dist}/${final-src.name}"> <fileset dir="${tomcat.dist}/src"> <include name="**" /> </fileset> </copy> <fixcrlf srcdir="${tomcat.dist}/${final-src.name}" excludes="**/*.jar,**/*.gif,**/*.bmp,**/*.jpg,**/*.ico" eol="lf"/> <tar longfile="gnu" tarfile="${tomcat.dist}/${final-src.name}.tar"> <tarfileset dir="${tomcat.dist}"> <include name="${final-src.name}/**" /> </tarfileset> </tar> <delete dir="${tomcat.dist}/${final-src.name}" /> <gzip zipfile="${tomcat.dist}/${final-src.name}.tar.gz" src="${tomcat.dist}/${final-src.name}.tar"/> <delete file="${tomcat.dist}/${final-src.name}.tar" /> <!-- Package JTC Source --> <mkdir dir="${tomcat.dist}/${jtc.final-src.name}" /> <copy todir="${tomcat.dist}/${jtc.final-src.name}"> <fileset dir="${tomcat.dist}/jtc-src"> <include name="**" /> </fileset> </copy> <!-- Note: Will break with Ant 1.4.1; Works with 1.5 Alpha --> <fixcrlf srcdir="${tomcat.dist}/${jtc.final-src.name}" excludes="**/*.jar,**/*.gif,**/*.bmp,**/*.jpg,**/*.ico" eol="lf"/> <tar longfile="gnu" tarfile="${tomcat.dist}/${jtc.final-src.name}.tar"> <tarfileset dir="${tomcat.dist}" mode="755"> <include name="${jtc.final-src.name}/jk/native/buildconf.sh" /> <include name="${jtc.final-src.name}/jk/native/apache-1.3/build-hpux-cc.sh" /> <include name="${jtc.final-src.name}/jk/native/apache-1.3/build-solaris.sh" /> <include name="${jtc.final-src.name}/jk/native/apache-1.3/build-unix.sh" /> <include name="${jtc.final-src.name}/jk/native/apache-2.0/build-unix.sh" /> <include name="${jtc.final-src.name}/jk/native/apache-2.0/install-unix.sh" /> <include name="${jtc.final-src.name}/jk/native/domino/mkini.sh" /> <include name="${jtc.final-src.name}/webapp/support/buildconf.sh" /> <include name="${jtc.final-src.name}/webapp/support/install.sh" /> <include name="${jtc.final-src.name}/webapp/support/mkinstalldirs.sh" /> </tarfileset> <tarfileset dir="${tomcat.dist}"> <include name="${jtc.final-src.name}/**" /> <exclude name="${jtc.final-src.name}/jk/native/buildconf.sh" /> <exclude name="${jtc.final-src.name}/jk/native/apache-1.3/build-hpux-cc.sh" /> <exclude name="${jtc.final-src.name}/jk/native/apache-1.3/build-solaris.sh" /> <exclude name="${jtc.final-src.name}/jk/native/apache-1.3/build-unix.sh" /> <exclude name="${jtc.final-src.name}/jk/native/apache-2.0/build-unix.sh" /> <exclude name="${jtc.final-src.name}/jk/native/apache-2.0/install-unix.sh" /> <exclude name="${jtc.final-src.name}/jk/native/domino/mkini.sh" /> <exclude name="${jtc.final-src.name}/webapp/support/buildconf.sh" /> <exclude name="${jtc.final-src.name}/webapp/support/install.sh" /> <exclude name="${jtc.final-src.name}/webapp/support/mkinstalldirs.sh" /> </tarfileset> </tar> <delete dir="${tomcat.dist}/${jtc.final-src.name}" /> <gzip zipfile="${tomcat.dist}/${jtc.final-src.name}.tar.gz" src="${tomcat.dist}/${jtc.final-src.name}.tar"/> <delete file="${tomcat.dist}/${jtc.final-src.name}.tar" /> </target> <target name="download" depends="proxyflags"> <!-- Downdown any sub package or tools needed. --> <antcall target="downloadgz"> <param name="sourcefile" value="${commons-beanutils.loc}"/> <param name="destfile" value="${commons-beanutils.jar}"/> </antcall> <antcall target="downloadgz"> <param name="sourcefile" value="${commons-collections.loc}"/> <param name="destfile" value="${commons-collections.jar}"/> </antcall> <antcall target="downloadgz"> <param name="sourcefile" value="${commons-digester.loc}"/> <param name="destfile" value="${commons-digester.jar}"/> </antcall> <!-- we need the release to happend, in the meantime use cvs... <antcall target="downloadgz"> <param name="sourcefile" value="${commons-logging.loc}"/> <param name="destfile" value="${commons-logging.jar}"/> </antcall> --> <antcall target="cvsbuild"> <param name="location" value="${commons-logging.loc}"/> <param name="subdir" value="${commons-logging.home}"/> <param name="destfile" value="${commons-logging.jar}"/> </antcall> <copy file="${commons-logging.home}/dist/commons-logging.jar" tofile="${commons-logging.jar}" /> <copy file="${commons-logging.home}/dist/commons-logging-api.jar" tofile="${commons-logging-api.jar}" /> <antcall target="downloadgz"> <param name="sourcefile" value="${regexp.loc}"/> <param name="destfile" value="${regexp.jar}"/> </antcall> <!-- Servlet api needs something different. --> <antcall target="cvsbuild"> <param name="location" value="${servlet.loc}"/> <param name="subdir" value="${servlet.home}"/> <param name="destfile" value="${servlet.jar}"/> </antcall> <antcall target="downloadgz"> <!-- xerces2 brings 2 files, test for one of them --> <param name="sourcefile" value="${xerces.loc}"/> <param name="destfile" value="${xmlParserAPIs.jar}"/> </antcall> <!-- commons- daemons/dbcp/pool need something different. --> <antcall target="cvsbuild"> <param name="location" value="${commons-daemon.loc}"/> <param name="subdir" value="${commons-daemon.home}"/> <param name="destfile" value="${commons-daemon.jar}"/> </antcall> <!-- Pool 1.0 --> <antcall target="downloadgz"> <param name="sourcefile" value="${commons-pool.loc}"/> <param name="destfile" value="${commons-pool.jar}"/> </antcall> <!-- commons-dbcp needs pool and ../LICENSE --> <!-- That is ugly XXX needs a review --> <copy file="LICENSE" tofile="../LICENSE"/> <antcall target="cvsbuild"> <param name="location" value="${commons-dbcp.loc}"/> <param name="subdir" value="${commons-dbcp.home}"/> <param name="destfile" value="${commons-dbcp.jar}"/> <param name="name" value="commons-dbcp"/> </antcall> <!-- Dbcp does not put commons-dbcp.jar in ${commons-dbcp.home} --> <copy file="${commons-dbcp.home}/dist/commons-dbcp.jar" tofile="${commons-dbcp.jar}" /> <antcall target="downloadgz"> <param name="sourcefile" value="${commons-modeler.loc}"/> <param name="destfile" value="${commons-modeler.jar}"/> </antcall> <antcall target="downloadzip"> <param name="sourcefile" value="${javaservice.loc}"/> <param name="destfile" value="${javaservice.home}/bin/JavaService.exe"/> <param name="destdir" value="${javaservice.home}"/> </antcall> <antcall target="downloadgz"> <param name="sourcefile" value="${jmx.loc}"/> <param name="destfile" value="${jmx.jar}"/> </antcall> <antcall target="downloadzip"> <param name="sourcefile" value="${junit.loc}"/> <param name="destfile" value="${junit.jar}"/> <param name="destdir" value="${base.path}"/> </antcall> <antcall target="downloadfile"> <param name="sourcefile" value="${nsis.loc}"/> <param name="destfile" value="${nsis.home}/nsis198.exe"/> <param name="destdir" value="${nsis.home}"/> </antcall> <antcall target="downloadgz"> <param name="sourcefile" value="${struts.loc}"/> <param name="destfile" value="${struts.jar}"/> </antcall> <!-- <antcall target="downloadfile"> <param name="sourcefile" value="${tyrex.loc}"/> <param name="destfile" value="${tyrex.jar}"/> <param name="destdir" value="${tyrex.home}"/> </antcall> --> </target> <target name="proxyflags"> <!-- check proxy parameters. --> <condition property="useproxy"> <equals arg1="${proxy.use}" arg2="on" /> </condition> </target> <target name="setproxy" if="useproxy"> <taskdef name="setproxy" classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" /> <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/> <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> </target> <target name="testexist"> <echo message="Testing for ${destfile}"/> <available file="${destfile}" property="exist"/> </target> <target name="downloadgz" unless="exist" depends="setproxy,testexist"> <!-- Download and extract the package --> <get src="${sourcefile}" dest="${base.path}/file.tar.gz" /> <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/> <untar src="${base.path}/file.tar" dest="${base.path}"/> <delete file="${base.path}/file.tar"/> <delete file="${base.path}/file.tar.gz"/> </target> <target name="downloadzip" unless="exist" depends="setproxy,testexist"> <!-- Download and extract the package --> <get src="${sourcefile}" dest="${base.path}/file.zip" /> <mkdir dir="${destdir}" /> <unzip src="${base.path}/file.zip" dest="${destdir}"/> <delete file="${base.path}/file.zip"/> </target> <target name="downloadfile" unless="exist" depends="setproxy,testexist"> <!-- Download extract the file --> <mkdir dir="${destdir}" /> <get src="${sourcefile}" dest="${destfile}" /> </target> <target name="cvsbuild" unless="exist" depends="testexist"> <!-- cvs checkout and ant dist + copy of jar file --> <echo message="cvs co ${location} and ant dist in ${subdir}"/> <mkdir dir="${base.path}/tmp"/> <cvs cvsRoot="${cvsroot}" package="${location}" dest="${base.path}/tmp" /> <!-- the software is checked out in ${{base.path}/tmp/${location} --> <move todir="${subdir}"> <fileset dir="${base.path}/tmp/${location}/"/> </move> <!-- now build the distribution --> <ant dir="${subdir}" target="dist"/> </target> <target name="jfc"> <antcall target="cvsbuild"> <param name="location" value="${commons-daemon.loc}"/> <param name="subdir" value="${commons-daemon.home}"/> <param name="destfile" value="${commons-daemon.jar}"/> </antcall> </target> </project> 1.1 jakarta-tomcat-5/download.properties Index: download.properties =================================================================== #Version number version=5.0 #Proxy to download subproject #proxy.host=proxy.domain #proxy.port=8080 #proxy.use=on #CVS root for the jakarta repositories. cvsroot=":pserver:[EMAIL PROTECTED]:/home/cvspublic" # ----- Default Base Path for Dependent Packages ----- base.path=/usr/local # -------------------------------------------------- # REQUIRED LIBRARIES # -------------------------------------------------- # ----- Commons Beanutils, version 1.1 or later ----- commons-beanutils.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-beanutils/v1.3/commons-beanutils-1.3.tar.gz # ----- Commons Collections, version 1.0 or later ----- commons-collections.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-collections/v2.0/commons-collections-2.0.tar.gz # ----- Commons Digester, version 1.1.1 or later ----- commons-digester.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1.2/commons-digester-1.2.tar.gz # ----- Commons Logging, version 1.0.1 or later ----- commons-logging.loc=jakarta-commons/logging #commons-logging.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-logging/v1.0.1/commons-logging-1.0.1.tar.gz # ----- Jakarta Regular Expressions Library, version 1.2 ----- regexp.loc=http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/jakarta-regexp-1.2.tar.gz # ----- Jakarta Servlet API Classes (Servlet 2.3 / JSP 1.2) ----- servlet.loc=jakarta-servletapi-4 # ----- Xerces XML Parser, version 2.0.0 or later ----- xerces.loc=http://xml.apache.org/dist/xerces-j/Xerces-J-bin.2.0.2.tar.gz # -------------------------------------------------- # OPTIONAL LIBRARIES # -------------------------------------------------- # ----- Commons Daemon, version 20020219 or later ----- commons-daemon.loc=jakarta-commons-sandbox/daemon # ----- Commons DBCP, version 20011030 or later ----- commons-dbcp.loc=jakarta-commons/dbcp # ----- Commons Modeler, version 1.0 or later ----- commons-modeler.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-modeler/v1.0/commons-modeler-1.0.tar.gz # ----- Commons Pool, version 1.0 or later ----- commons-pool.loc=http://jakarta.apache.org/builds/jakarta-commons/release/commons-pool/v1.0/commons-pool-1.0.tar.gz # ----- JavaService, version 1.2.0 or later ----- javaservice.loc=http://www.alexandriasc.com/software/JavaService/JavaService-bin-1.2.0.zip # ----- Java Management Extensions (JMX), JMX RI 1.0.1 or later or MX4J 1.1 or later ----- jmx.loc=http://telia.dl.sourceforge.net/sourceforge/mx4j/mx4j-1.1.tar.gz # ----- JUnit Unit Test Suite, version 3.7 or later ----- junit.loc=http://download.sourceforge.net/junit/junit3.7.zip # ----- NSIS, version 1.90 or later ----- nsis.loc=http://www.nullsoft.com/free/nsis/nsis198.exe # ----- Struts, version 1.0.1 or later ----- struts.loc=http://jakarta.apache.org/builds/jakarta-struts/release/v1.0.2/jakarta-struts-1.0.2.tar.gz # ----- Tyrex Data Source, version 1.0 ----- tyrex.loc=ftp://ftp.exolab.org/pub/tyrex/tyrex-1.0/tyrex-1.0.jar 1.1 jakarta-tomcat-5/tomcat.nsi Index: tomcat.nsi =================================================================== ; Tomcat 4 script for Nullsoft Installer ; $Id: tomcat.nsi,v 1.1 2002/07/19 00:39:13 remm Exp $ Name "Apache Tomcat @VERSION@" OutFile tomcat4.exe CRCCheck on SetCompress force SetDatablockOptimize on BGGradient 000000 800000 FFFFFF InstallColors FF8080 000000 InstProgressFlags smooth colored Icon main.ico UninstallIcon uninst.ico EnabledBitmap tickyes.bmp DisabledBitmap tickno.bmp LicenseText "You must read the following license before installing:" LicenseData INSTALLLICENSE ComponentText "This will install the Apache Tomcat 4.1 servlet container on your computer:" InstType Normal InstType Minimum InstType "Full (w/ Source Code)" AutoCloseWindow false ShowInstDetails show DirText "Please select a location to install Tomcat 4.1 (or use the default):" SetOverwrite on SetDateSave on InstallDir "$PROGRAMFILES\Apache Group\Tomcat 4.1" InstallDirRegKey HKLM "SOFTWARE\Apache Group\Tomcat\4.1" "" Section "Tomcat (required)" SectionIn 1 2 3 SetOutPath $INSTDIR File tomcat.ico File LICENSE File /r bin Delete "$INSTDIR\bin\tomcat.exe" File /r common File /r shared File /r logs File /r server File /r work File /r temp SetOutPath $INSTDIR\webapps File webapps\*.xml File /r webapps\ROOT Call findJavaPath Pop $2 CopyFiles "$2\lib\tools.jar" "$INSTDIR\common\lib" 4500 WriteUninstaller "$INSTDIR\uninst-tomcat4.exe" SectionEnd Section "NT Service (NT/2k/XP only)" SectionIn 3 Call findJVMPath Pop $2 SetOutPath $INSTDIR\bin File /oname=tomcat.exe bin\tomcat.exe ExecWait '"$INSTDIR\bin\tomcat.exe" -install "Apache Tomcat 4.1" "$2" -Djava.class.path="$INSTDIR\bin\bootstrap.jar" -Dcatalina.home="$INSTDIR" -Djava.endorsed.dirs="$INSTDIR\common\endorsed" -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out "$INSTDIR\logs\stdout.log" -err "$INSTDIR\logs\stderr.log"' ClearErrors SectionEnd Section "JSP Development Shell Extensions" SectionIn 1 2 3 ; back up old value of .jsp ReadRegStr $1 HKCR ".jsp" "" StrCmp $1 "" Label1 StrCmp $1 "JSPFile" Label1 WriteRegStr HKCR ".jsp" "backup_val" $1 Label1: WriteRegStr HKCR ".jsp" "" "JSPFile" WriteRegStr HKCR "JSPFile" "" "Java Server Pages source" WriteRegStr HKCR "JSPFile\shell" "" "open" WriteRegStr HKCR "JSPFile\DefaultIcon" "" "$INSTDIR\tomcat.ico" WriteRegStr HKCR "JSPFile\shell\open\command" "" 'notepad.exe "%1"' SectionEnd Section "Tomcat Start Menu Group" SectionIn 1 2 3 Call findJavaPath Pop $2 SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1" CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Home Page.lnk" \ "http://jakarta.apache.org/tomcat" CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Uninstall Tomcat 4.1.lnk" \ "$INSTDIR\uninst-tomcat4.exe" CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat 4.1 Program Directory.lnk" \ "$INSTDIR" CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Start Tomcat.lnk" \ "$2\bin\java.exe" \ '-jar -Duser.dir="$INSTDIR" "$INSTDIR\bin\bootstrap.jar" start' \ "$INSTDIR\tomcat.ico" 0 SW_SHOWNORMAL CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Stop Tomcat.lnk" \ "$2\bin\java.exe" \ '-jar -Duser.dir="$INSTDIR" "$INSTDIR\bin\bootstrap.jar" stop' \ "$INSTDIR\tomcat.ico" 0 SW_SHOWMINIMIZED SectionEnd SectionDivider " documentation and examples " Section "Tomcat Documentation" SectionIn 1 3 SetOutPath $INSTDIR\webapps File /r webapps\tomcat-docs IfFileExists "$SMPROGRAMS\Apache Tomcat 4.1" 0 NoLinks SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1" CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Documentation.lnk" \ "$INSTDIR\webapps\tomcat-docs\index.html" NoLinks: SectionEnd Section "Example Web Applications" SectionIn 1 3 SetOverwrite off SetOutPath $INSTDIR\conf File conf\server.xml SetOverwrite on SetOutPath $INSTDIR\webapps File /r webapps\examples File /r webapps\webdav SectionEnd SectionDivider " developer resources " Section "Tomcat Source Code" SectionIn 3 SetOutPath $INSTDIR File /r src File /r jtc-src SectionEnd Section -post SetOverwrite off SetOutPath $INSTDIR\conf File /oname=server.xml conf\server-noexamples.xml.config SetOutPath $INSTDIR File /r conf SetOverwrite on Call configure Call startService WriteRegStr HKLM "SOFTWARE\Apache Group\Tomcat\4.1" "" $INSTDIR WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 4.1" \ "DisplayName" "Apache Tomcat 4.1 (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 4.1" \ "UninstallString" '"$INSTDIR\uninst-tomcat4.exe"' Sleep 500 BringToFront SectionEnd Function .onInit ClearErrors Call findJavaPath Pop $1 MessageBox MB_OK "Using Java Development Kit found in $1" FunctionEnd Function .onInstSuccess ExecShell open '$SMPROGRAMS\Apache Tomcat 4.1' FunctionEnd ; ===================== ; FindJavaPath Function ; ===================== ; ; Find the JAVA_HOME used on the system, and put the result on the top of the ; stack ; Will exit if the path cannot be determined ; Function findJavaPath ClearErrors ReadEnvStr $1 JAVA_HOME IfErrors 0 FoundJDK ClearErrors ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Development Kit" "CurrentVersion" ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Development Kit\$2" "JavaHome" ReadRegStr $3 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $4 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$3" "RuntimeLib" FoundJDK: IfErrors 0 NoAbort MessageBox MB_OK "Couldn't find a Java Development Kit installed on this \ computer. Please download one from http://java.sun.com. If there is already \ a JDK installed on this computer, set an environment variable JAVA_HOME to the \ pathname of the directory where it is installed." Abort NoAbort: ; Put the result in the stack Push $1 FunctionEnd ; ==================== ; FindJVMPath Function ; ==================== ; ; Find the full JVM path, and put the result on top of the stack ; Will exit if the path cannot be determined ; Function findJVMPath ReadEnvStr $1 JAVA_HOME IfFileExists "$1\jre\bin\hotspot\jvm.dll" 0 TryJDK14 StrCpy $2 "$1\jre\bin\hotspot\jvm.dll" Goto EndIfFileExists TryJDK14: IfFileExists "$1\jre\bin\server\jvm.dll" 0 TryClassic StrCpy $2 "$1\jre\bin\server\jvm.dll" Goto EndIfFileExists TryClassic: IfFileExists "$1\jre\bin\classic\jvm.dll" 0 JDKNotFound StrCpy $2 "$1\jre\bin\classic\jvm.dll" Goto EndIfFileExists JDKNotFound: SetErrors EndIfFileExists: IfErrors 0 FoundJVMPath ClearErrors ReadRegStr $1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion" ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$1" "RuntimeLib" FoundJVMPath: IfErrors 0 NoAbort MessageBox MB_OK "Couldn't find a Java Development Kit installed on this \ computer. Please download one from http://java.sun.com." Abort NoAbort: ; Put the result in the stack Push $2 FunctionEnd ; ================== ; Configure Function ; ================== ; ; Display the configuration dialog boxes, read the values entered by the user, ; and build the configuration files ; Function configure ; Output files needed for the configuration dialog SetOverwrite on GetTempFileName $8 GetTempFileName $7 File /oname=$8 "InstallOptions.dll" File /oname=$7 "config.ini" Push $7 CallInstDLL $8 dialog Pop $1 StrCmp $1 "0" NoConfig ReadINIStr $R0 $7 "Field 2" State ReadINIStr $R1 $7 "Field 5" State ReadINIStr $R2 $7 "Field 7" State StrCpy $R4 'port="$R0"' StrCpy $R5 '<user name="$R1" password="$R2" roles="admin,manager" />' SetOutPath $TEMP File /r confinstall ; Build final server.xml Delete "$INSTDIR\conf\server.xml" FileOpen $R9 "$INSTDIR\conf\server.xml" w Push "$TEMP\confinstall\server_1.xml" Call copyFile FileWrite $R9 $R4 Push "$TEMP\confinstall\server_2.xml" Call copyFile FileClose $R9 ; Build final tomcat-users.xml Delete "$INSTDIR\conf\tomcat-users.xml" FileOpen $R9 "$INSTDIR\conf\tomcat-users.xml" w Push "$TEMP\confinstall\tomcat-users_1.xml" Call copyFile FileWrite $R9 $R5 Push "$TEMP\confinstall\tomcat-users_2.xml" Call copyFile FileClose $R9 ; Creating a few shortcuts IfFileExists "$SMPROGRAMS\Apache Tomcat 4.1" 0 NoLinks SetOutPath "$SMPROGRAMS\Apache Tomcat 4.1" CreateShortCut "$SMPROGRAMS\Apache Tomcat 4.1\Tomcat Administration.lnk" \ "http://127.0.0.1:$R0/admin" NoLinks: NoConfig: Delete $7 Delete $8 RMDir /r "$TEMP\confinstall" FunctionEnd ; ================= ; CopyFile Function ; ================= ; ; Copy specified file contents to $R9 ; Function copyFile ClearErrors Pop $0 FileOpen $1 $0 r NoError: FileRead $1 $2 IfErrors EOF 0 FileWrite $R9 $2 IfErrors 0 NoError EOF: FileClose $1 ClearErrors FunctionEnd ; ===================== ; StartService Function ; ===================== ; ; Start Tomcat NT Service ; Function startService IfFileExists "$INSTDIR\bin\tomcat.exe" 0 NoService ExecWait 'net start "Apache Tomcat 4.1"' Sleep 4000 NoService: FunctionEnd ; ===================== ; StopService Function ; ===================== ; ; Stop Tomcat NT Service ; Function un.stopService IfFileExists "$INSTDIR\bin\tomcat.exe" 0 NoService ExecWait 'net stop "Apache Tomcat 4.1"' Sleep 2000 NoService: FunctionEnd UninstallText "This will uninstall Apache Tomcat 4.1 from your system:" Section Uninstall Delete "$INSTDIR\uninst-tomcat4.exe" ; Stopping NT service (if in use) Call un.stopService ReadRegStr $1 HKCR ".jsp" "" StrCmp $1 "JSPFile" 0 NoOwn ; only do this if we own it ReadRegStr $1 HKCR ".jsp" "backup_val" StrCmp $1 "" 0 RestoreBackup ; if backup == "" then delete the whole key DeleteRegKey HKCR ".jsp" Goto NoOwn RestoreBackup: WriteRegStr HKCR ".jsp" "" $1 DeleteRegValue HKCR ".jsp" "backup_val" NoOwn: ExecWait '"$INSTDIR\bin\tomcat.exe" -uninstall "Apache Tomcat 4.1"' ClearErrors DeleteRegKey HKCR "JSPFile" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Apache Tomcat 4.1" DeleteRegKey HKLM "SOFTWARE\Apache Group\Tomcat\4.1" RMDir /r "$SMPROGRAMS\Apache Tomcat 4.1" Delete "$INSTDIR\tomcat.ico" Delete "$INSTDIR\LICENSE" RMDir /r "$INSTDIR\bin" RMDir /r "$INSTDIR\common" Delete "$INSTDIR\conf\*.dtd" RMDir /r "$INSTDIR\shared" RMDir "$INSTDIR\logs" RMDir /r "$INSTDIR\server" RMDir "$INSTDIR\webapps\*.xml" RMDir /r "$INSTDIR\webapps\ROOT" RMDir /r "$INSTDIR\webapps\tomcat-docs" RMDir /r "$INSTDIR\webapps\examples" RMDir /r "$INSTDIR\webapps\webdav" RMDir "$INSTDIR\webapps" RMDir /r "$INSTDIR\work" RMDir /r "$INSTDIR\temp" RMDir /r "$INSTDIR\src" RMDir /r "$INSTDIR\jtc-src" RMDir "$INSTDIR" ; if $INSTDIR was removed, skip these next ones IfFileExists "$INSTDIR" 0 Removed MessageBox MB_YESNO|MB_ICONQUESTION \ "Remove all files in your Tomcat 4.1 directory? (If you have anything\ you created that you want to keep, click No)" IDNO Removed Delete "$INSTDIR\*.*" ; this would be skipped if the user hits no RMDir /r "$INSTDIR" Sleep 500 IfFileExists "$INSTDIR" 0 Removed MessageBox MB_OK|MB_ICONEXCLAMATION \ "Note: $INSTDIR could not be removed." Removed: SectionEnd 1.1 jakarta-tomcat-5/resources/INSTALLLICENSE Index: INSTALLLICENSE =================================================================== ========================================================== The Apache Software License, Version 1.1 Copyright (c) 1999, 2000, 2001 The Apache Software Foundation. All rights reserved. ========================================================== Redistribution and use in source and binary forms, with or without modi- fication, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowlegement: "This product includes software developed by the Apache Software Foundation <http://www.apache.org/>." Alternately, this acknowlegement may appear in the software itself, if and wherever such third-party acknowlegements normally appear. 4. The names "The Jakarta Project", "Tomcat", and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact <[EMAIL PROTECTED]>. 5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their names without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ========================================================== This software consists of voluntary contributions made by many indivi- duals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. ========================================================== 1.1 jakarta-tomcat-5/resources/config.ini Index: config.ini =================================================================== [Settings] NumFields=7 Title=Test Install Setup: Testing Installer Options ; uncomment this to confirm on exit. ; CancelConfirm=Are you sure you want to cancel the install? ; comment this out to hide the back button BackEnabled=0 ; you can override the defaults here CancelButtonText=Skip NextButtonText=Next > [Field 1] Type=Label Text=HTTP/1.1 Connector Port left=0 right=150 top=5 bottom=20 [Field 2] Type=Text State=8080 MaxLen=5 left=150 right=200 top=0 bottom=20 [Field 3] Type=Label text=Administrator Login left=0 right=300 top=30 bottom=45 [Field 4] Type=Label Text=User Name left=0 right=150 top=50 bottom=65 [Field 5] Type=Text State=admin left=150 right=250 top=45 bottom=65 [Field 6] Type=Label Text=Password left=0 right=150 top=70 bottom=85 [Field 7] Type=Password left=150 right=250 top=65 bottom=85 1.1 jakarta-tomcat-5/resources/main.ico <<Binary file>> 1.1 jakarta-tomcat-5/resources/tickno.bmp <<Binary file>> 1.1 jakarta-tomcat-5/resources/tickyes.bmp <<Binary file>> 1.1 jakarta-tomcat-5/resources/tomcat.ico <<Binary file>> 1.1 jakarta-tomcat-5/resources/uninst.ico <<Binary file>> 1.1 jakarta-tomcat-5/resources/confinstall/server_1.xml Index: server_1.xml =================================================================== <!-- Example Server Configuration File --> <!-- Note that component elements are nested corresponding to their parent-child relationships with each other --> <!-- A "Server" is a singleton element that represents the entire JVM, which may contain one or more "Service" instances. The Server listens for a shutdown command on the indicated port. Note: A "Server" is not itself a "Container", so you may not define subcomponents such as "Valves" or "Loggers" at this level. --> <Server port="8005" shutdown="SHUTDOWN" debug="0"> <!-- Uncomment these entries to enable JMX MBeans support --> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0"/> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/> <!-- Global JNDI resources --> <GlobalNamingResources> <!-- Test entry for demonstration purposes --> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved"> </Resource> <ResourceParams name="UserDatabase"> <parameter> <name>factory</name> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value> </parameter> <parameter> <name>pathname</name> <value>conf/tomcat-users.xml</value> </parameter> </ResourceParams> </GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" (and therefore the web applications visible within that Container). Normally, that Container is an "Engine", but this is not required. Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" or "Loggers" at this level. --> <!-- Define the Tomcat Stand-Alone Service --> <Service name="Tomcat-Standalone"> <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated "Container" (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 4.0 documentation bundle for more detailed instructions): * Download and install JSSE 1.0.2 or later, and put the JAR files into "$JAVA_HOME/jre/lib/ext". * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of "changeit" for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the "enableLookups" attribute to "false". When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. --> <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" 1.1 jakarta-tomcat-5/resources/confinstall/server_2.xml Index: server_2.xml =================================================================== minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false" /> <!-- Note : To disable connection timeouts, set connectionTimeout value to -1 --> <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 --> <!-- <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8443" minProcessors="5" maxProcessors="75" enableLookups="true" acceptCount="10" debug="0" scheme="https" secure="true" useURIValidationHack="false"> <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory" clientAuth="false" protocol="TLS" /> </Connector> --> <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8009" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/> <!-- Define an AJP 1.3 Connector on port 8009 --> <!-- <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" port="8009" minProcessors="5" maxProcessors="75" acceptCount="10" debug="0"/> --> <!-- Define a Proxied HTTP/1.1 Connector on port 8082 --> <!-- See proxy documentation for more information about using this. --> <!-- <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8082" minProcessors="5" maxProcessors="75" enableLookups="true" acceptCount="10" debug="0" connectionTimeout="20000" proxyPort="80" useURIValidationHack="false" /> --> <!-- Define a non-SSL legacy HTTP/1.1 Test Connector on port 8083 --> <!-- <Connector className="org.apache.catalina.connector.http.HttpConnector" port="8083" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" /> --> <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8084 --> <!-- <Connector className="org.apache.catalina.connector.http10.HttpConnector" port="8084" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" /> --> <!-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). --> <!-- Define the top level container in our container hierarchy --> <Engine name="Standalone" defaultHost="localhost" debug="0"> <!-- The request dumper valve dumps useful debugging information about the request headers and cookies that were received, and the response headers and cookies that were sent, for all requests received by this instance of Tomcat. If you care only about requests to a particular virtual host, or a particular application, nest this element inside the corresponding <Host> or <Context> entry instead. For a similar mechanism that is portable to all Servlet 2.3 containers, check out the "RequestDumperFilter" Filter in the example application (the source for this filter may be found in "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters"). Request dumping is disabled by default. Uncomment the following element to enable it. --> <!-- <Valve className="org.apache.catalina.valves.RequestDumperValve"/> --> <!-- Global logger unless overridden at lower levels --> <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/> <!-- Because this Realm is here, an instance will be shared globally --> <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. --> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/> <!-- Comment out the old realm but leave here for now in case we need to go back quickly --> <!-- <Realm className="org.apache.catalina.realm.MemoryRealm" /> --> <!-- Replace the above Realm with one of the following to get a Realm stored in a database and accessed via JDBC --> <!-- <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="org.gjt.mm.mysql.Driver" connectionURL="jdbc:mysql://localhost/authority" connectionName="test" connectionPassword="test" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name" /> --> <!-- <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL" connectionName="scott" connectionPassword="tiger" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name" /> --> <!-- <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="sun.jdbc.odbc.JdbcOdbcDriver" connectionURL="jdbc:odbc:CATALINA" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name" /> --> <!-- Define the default virtual host --> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true"> <!-- Normally, users must authenticate themselves to each web app individually. Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user identity maintained across *all* web applications contained in this virtual host. --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" debug="0"/> --> <!-- Access log processes all requests for this virtual host. By default, log files are created in the "logs" directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the "directory" attribute. Specify either a relative (to $CATALINA_HOME) or absolute path to the desired directory. --> <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> --> <!-- Logger shared by all Contexts related to this virtual host. By default (when using FileLogger), log files are created in the "logs" directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the "directory" attribute. Specify either a relative (to $CATALINA_HOME) or absolute path to the desired directory.--> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> <!-- Define properties for each web application. This is only needed if you want to set non-default properties, or have web application document roots in places other than the virtual host's appBase directory. --> <!-- Tomcat Root Context --> <!-- <Context path="" docBase="ROOT" debug="0"/> --> <!-- Tomcat Examples Context --> <Context path="/examples" docBase="examples" debug="0" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_examples_log." suffix=".txt" timestamp="true"/> <Ejb name="ejb/EmplRecord" type="Entity" home="com.wombat.empl.EmployeeRecordHome" remote="com.wombat.empl.EmployeeRecord"/> <!-- If you wanted the examples app to be able to edit the user database, you would uncomment the following entry. Of course, you would want to enable security on the application as well, so this is not done by default! The database object could be accessed like this: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup("java:comp/env"); UserDatabase database = (UserDatabase) envCtx.lookup("userDatabase"); --> <!-- <ResourceLink name="userDatabase" global="UserDatabase" type="org.apache.catalina.UserDatabase"/> --> <!-- PersistentManager: Uncomment the section below to test Persistent Sessions. saveOnRestart: If true, all active sessions will be saved to the Store when Catalina is shutdown, regardless of other settings. All Sessions found in the Store will be loaded on startup. Sessions past their expiration are ignored in both cases. maxActiveSessions: If 0 or greater, having too many active sessions will result in some being swapped out. minIdleSwap limits this. -1 means unlimited sessions are allowed. 0 means sessions will almost always be swapped out after use - this will be noticeably slow for your users. minIdleSwap: Sessions must be idle for at least this long (in seconds) before they will be swapped out due to maxActiveSessions. This avoids thrashing when the site is highly active. -1 or 0 means there is no minimum - sessions can be swapped out at any time. maxIdleSwap: Sessions will be swapped out if idle for this long (in seconds). If minIdleSwap is higher, then it will override this. This isn't exact: it is checked periodically. -1 means sessions won't be swapped out for this reason, although they may be swapped out for maxActiveSessions. If set to >= 0, guarantees that all sessions found in the Store will be loaded on startup. maxIdleBackup: Sessions will be backed up (saved to the Store, but left in active memory) if idle for this long (in seconds), and all sessions found in the Store will be loaded on startup. If set to -1 sessions will not be backed up, 0 means they should be backed up shortly after being used. To clear sessions from the Store, set maxActiveSessions, maxIdleSwap, and minIdleBackup all to -1, saveOnRestart to false, then restart Catalina. --> <!-- <Manager className="org.apache.catalina.session.PersistentManager" debug="0" saveOnRestart="true" maxActiveSessions="-1" minIdleSwap="-1" maxIdleSwap="-1" maxIdleBackup="-1"> <Store className="org.apache.catalina.session.FileStore"/> </Manager> --> <Environment name="maxExemptions" type="java.lang.Integer" value="15"/> <Parameter name="context.param.name" value="context.param.value" override="false"/> <Resource name="jdbc/EmployeeAppDb" auth="SERVLET" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/EmployeeAppDb"> <parameter><name>user</name><value>sa</value></parameter> <parameter><name>password</name><value></value></parameter> <parameter><name>driverClassName</name> <value>org.hsql.jdbcDriver</value></parameter> <parameter><name>driverName</name> <value>jdbc:HypersonicSQL:database</value></parameter> </ResourceParams> <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/> <ResourceParams name="mail/Session"> <parameter> <name>mail.smtp.host</name> <value>localhost</value> </parameter> </ResourceParams> <ResourceLink name="linkToGlobalResource" global="simpleValue" type="java.lang.Integer"/> </Context> </Host> </Engine> </Service> <!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0 as its servlet container. Please read the README.txt file coming with the WebApp Module distribution on how to build it. (Or check out the "jakarta-tomcat-connectors/webapp" CVS repository) To configure the Apache side, you must ensure that you have the "ServerName" and "Port" directives defined in "httpd.conf". Then, lines like these to the bottom of your "httpd.conf" file: LoadModule webapp_module libexec/mod_webapp.so WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ The next time you restart Apache (after restarting Tomcat, if needed) the connection will be established, and all applications you make visible via "WebAppDeploy" directives can be accessed through Apache. --> <!-- Define an Apache-Connector Service --> <!-- <Service name="Tomcat-Apache"> <Connector className="org.apache.catalina.connector.warp.WarpConnector" port="8008" minProcessors="5" maxProcessors="75" enableLookups="true" appBase="webapps" acceptCount="10" debug="0"/> <Engine className="org.apache.catalina.connector.warp.WarpEngine" name="Apache" debug="0"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="apache_log." suffix=".txt" timestamp="true"/> <Realm className="org.apache.catalina.realm.MemoryRealm" /> </Engine> </Service> --> </Server> 1.1 jakarta-tomcat-5/resources/confinstall/tomcat-users_1.xml Index: tomcat-users_1.xml =================================================================== <!-- NOTE: By default, no user is included in the "manager" role required to operate the "/manager" web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. --> <tomcat-users> 1.1 jakarta-tomcat-5/resources/confinstall/tomcat-users_2.xml Index: tomcat-users_2.xml =================================================================== <user name="tomcat" password="tomcat" roles="tomcat" /> <user name="role1" password="tomcat" roles="role1" /> <user name="both" password="tomcat" roles="tomcat,role1" /> </tomcat-users>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>