You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/02/03 09:39:46 UTC

cvs commit: jakarta-cactus/petals/ant/src/confs/j2ee12/tomcat3x modules.xml tomcat-users.xml server.xml

vmassol     2003/02/03 00:39:46

  Added:       petals/ant/src/scripts/j2ee12 build.xml
                        build-tests-tomcat3x.xml
               petals/ant/src/confs/j2ee12/tomcat3x modules.xml
                        tomcat-users.xml server.xml
  Log:
  Major refactoring of the build systems and directory layout:
  * Factorized common build parts into build-common.xml and normalized the builds
  * Added "release" target to all builds
  * Moved the sample-servlet and sample-jetty to samples/servlet and samples/jetty
  * Moved the web site upload to the documentation build
  * Simplified to the extreme the main Cactus build.xml and removed the build-admin.xml scripts
  * Removed some Ant tasks that were in anttasks/ as they are now in the Ant Petal
  * Some other cosmetic changes
  * Added scripts for Tomcat 3.x (However, I get a strange error while running Tomcat 3.3.1. Not sure why yet (some flushbuffer() jasper error))
  * WL 7.x script has been tested and works (for JDK < 1.4)
  
  Several issues/todos remain:
  
  * The Gump build is probably not working at all (I'll correct it as I receive Gump email notifications of errors)
  * The Clover report is currently broken (i.e. not generated)
  * The sample-jetty needs to be put in line with the new build system and use the new Ant Petal
  * Pb of order in Sample Servlet test cases (one of the test must run before the other but this is not currently possible with the Ant Petal)
  * WL 6.x script needs to be tested
  
  Revision  Changes    Path
  1.1                  jakarta-cactus/petals/ant/src/scripts/j2ee12/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!DOCTYPE project [
      <!ENTITY build-share SYSTEM "file:./scripts/build-share.xml">
      <!ENTITY build-tests-tomcat3x SYSTEM "file:./scripts/build-tests-tomcat3x.xml">
      <!ENTITY build-tests-tomcat4x SYSTEM "file:./scripts/build-tests-tomcat4x.xml">
      <!ENTITY build-tests-resin2x SYSTEM "file:./scripts/build-tests-resin2x.xml">
      <!ENTITY build-tests-orion1x SYSTEM "file:./scripts/build-tests-orion1x.xml">
      <!ENTITY build-tests-weblogic7x SYSTEM "file:./scripts/build-tests-weblogic7x.xml">
      <!ENTITY build-tests-weblogic6x SYSTEM "file:./scripts/build-tests-weblogic6x.xml">
  ]>
  
  <!--
    =============================================================================
      Generic build file for executing Cactus tests. This Ant script is expected
      to be called from another Ant script, using the <ant> task. 
  
      The following Ant properties need to be passed to this script:
  
          cactus.home.[container]    Location where the container is installed
  
          cactus.port                [OPTIONAL] Port on which to start the 
                                     containers (Default is 8080)
  
          cactus.target.dir          [OPTIONAL] Tmp directory for Cactus 
                                     operations
          
          cactus.war                 Location of the war to cactify        
  
          cactus.src.dir             Location of Cactus java source files
          
          cactus.src.includes        [OPTIONAL] List of Cactus java test files
                                     to include in the test. Defaults to
                                     "**/*Test*.java".
  
          cactus.src.excludes        [OPTIONAL] List of Cactus java test files
                                     to exclude in the test. Defaults to
                                     "**/AllTests.java".
  
          cactus.jvm                 [OPTIONAL] JVM to use when running java
                                     Ant tasks. Default is "java". Other possible
                                     value is: "javaw" (windows). Note: This is
                                     for example to prevent a shell from opening
                                     on windows platform when this Ant script
                                     is called from a java application that has
                                     no shell.
  
          cactus.context             [OPTIONAL] Webapp context to use for the
                                     cactified war. Defaults to "cactustest".
                                     
      The following Ant references need to be passed to this script:
      
          cactus.classpath           [OPTIONAL] The classpath reference for 
                                     running junit on the client side. Only
                                     needed if special jars need to be on the
                                     classpath        
                                     
    =============================================================================
  -->
  <project name="Cactus Executor" default="cactus.init" basedir=".">
  
      &build-share;
  
      &build-tests-tomcat3x;
      &build-tests-tomcat4x;
      &build-tests-resin2x;
      &build-tests-orion1x;
      &build-tests-weblogic7x;
      &build-tests-weblogic6x;
  
  </project>
  
  
  
  1.1                  jakarta-cactus/petals/ant/src/scripts/j2ee12/build-tests-tomcat3x.xml
  
  Index: build-tests-tomcat3x.xml
  ===================================================================
  
      <!-- Global properties -->
      <property name="cactus.conf.tomcat3x" value="${cactus.conf.dir}/tomcat3x"/>
      <property name="cactus.target.tomcat3x" value="${cactus.target.dir}/tomcat3x"/>
  
      <!--
         ========================================================================
           Run Tomcat 3.x tests
         ========================================================================
      -->
      <target name="cactus.run.tomcat3x" 
          depends="cactus.init,cactus.setup.tomcat3x,cactus.war,cactus.deploy.tomcat3x"
          if="cactus.home.tomcat3x" description="Run tests on Tomcat 3.x">
  
          <!-- Start the servlet engine, wait for it to be started, run the
               unit tests, stop the servlet engine, wait for it to be stopped.
               The servlet engine is stopped if the tests fail for any reason -->
  
          <runservertests
              testURL="http://localhost:${cactus.port}/${cactus.context}/ServletRedirector?Cactus_Service=RUN_TEST"
              startTarget="cactus.start.tomcat3x"
              stopTarget="cactus.stop.tomcat3x"
              testTarget="cactus.test"/>
  
      </target>
  
      <!--
         ========================================================================
           Start Tomcat 3.x
         ========================================================================
      -->
      <target name="cactus.start.tomcat3x" description="Start Tomcat 3.x"
          depends="cactus.check.tomcat3x" if="cactus.home.tomcat3x">
  
          <java jvm="${cactus.jvm}" classname="org.apache.tomcat.startup.Main" 
              fork="yes">
              <jvmarg value="-Dtomcat.home=${cactus.target.tomcat3x}"/>
              <jvmarg value="-Dtomcat.install=${cactus.home.tomcat3x}"/>
              <arg value="start"/>
              <classpath>
                  <fileset dir="${cactus.home.tomcat3x}/lib">
                      <include name="tomcat.jar"/>
                  </fileset>
              </classpath>
          </java>
  
      </target>
  
      <!--
         ========================================================================
           Stop Tomcat 3.3
         ========================================================================
      -->
      <target name="cactus.stop.tomcat3x" description="Stop Tomcat 3.x"
          depends="cactus.check.tomcat3x" if="cactus.home.tomcat3x">
  
          <java jvm="${cactus.jvm}" classname="org.apache.tomcat.startup.Main" 
              fork="yes">
              <jvmarg value="-Dtomcat.home=${cactus.target.tomcat3x}"/>
              <jvmarg value="-Dtomcat.install=${cactus.home.tomcat3x}"/>
              <arg value="stop"/>
              <classpath>
                  <fileset dir="${cactus.home.tomcat3x}/lib">
                      <include name="tomcat.jar"/>
                  </fileset>
              </classpath>
          </java>
  
      </target>
  
      <!--
         ========================================================================
           Display a warning message if the needed servlet engine home property
           is not set
         ========================================================================
      -->
      <target name="cactus.check.tomcat3x" unless="cactus.home.tomcat3x">
  
          <echo message=""/>
          <echo message="******************************************************"/>
          <echo message="WARNING : The 'cactus.home.tomcat3x' property has not"/>
          <echo message="been set. No test will be run on that servlet engine."/>
          <echo message="******************************************************"/>
          <echo message=""/>
  
      </target>
  
      <!--
         ========================================================================
           Deploy the cactified webapp
         ========================================================================
      -->
      <target name="cactus.deploy.tomcat3x" if="cactus.home.tomcat3x"
          description="Deploy the webapp on Tomcat 3.x">
  
          <!-- Copy the webapp -->
          <copy todir="${cactus.target.tomcat3x}/webapps/${cactus.context}">
              <fileset dir="${cactus.target.dir}/${cactus.context}"/>
          </copy>
  
      </target>
  
      <!--
         ========================================================================
           Set up a valid Tomcat 3.x directory structure in the
           cactus.target.tomcat3x directory.
         ========================================================================
      -->
      <target name="cactus.setup.tomcat3x"
          depends="cactus.init, cactus.check.tomcat3x" if="cactus.home.tomcat3x"
          description="Set up a Tomcat 3.x directory structure">
  
          <!-- Delete everything -->
          <delete dir="${cactus.target.tomcat3x}/webapps"/>
  
          <!-- Create work and conf directories and copy configuration files -->
          <mkdir dir="${cactus.target.tomcat3x}/conf"/>
          <mkdir dir="${cactus.target.tomcat3x}/work"/>
          <mkdir dir="${cactus.target.tomcat3x}/webapps"/>
  
          <copy todir="${cactus.target.tomcat3x}/conf" filtering="on">
              <fileset dir="${cactus.conf.tomcat3x}"/>
          </copy>
  
      </target>
  
  
  
  1.1                  jakarta-cactus/petals/ant/src/confs/j2ee12/tomcat3x/modules.xml
  
  Index: modules.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <modules>
  
  <module name="JNIConnectionHandler" javaClass="org.apache.tomcat.modules.server.JNIConnectionHandler"/>
  
  <module name="WorkDirSetup" javaClass="org.apache.tomcat.modules.config.WorkDirSetup"/>
  
  <module name="PathSetter" javaClass="org.apache.tomcat.modules.config.PathSetter"/>
  
  <module name="ApacheConfig" javaClass="org.apache.tomcat.modules.config.ApacheConfig"/>
  
  <module name="JservConfig" javaClass="org.apache.tomcat.modules.config.JservConfig"/>
  
  <module name="PolicyLoader" javaClass="org.apache.tomcat.modules.config.PolicyLoader"/>
  
  <module name="AutoWebApp" javaClass="org.apache.tomcat.modules.config.AutoWebApp"/>
  
  <module name="Http10Interceptor" javaClass="org.apache.tomcat.modules.server.Http10Interceptor"/>
  
  <module name="Http10Connector" javaClass="org.apache.tomcat.modules.server.Http10Interceptor"/>
  
  <module name="JniConnector" javaClass="org.apache.tomcat.modules.server.JNIConnectionHandler"/>
  
  <module name="Ajp12Connector" javaClass="org.apache.tomcat.modules.server.Ajp12Interceptor"/>
  
  <module name="Ajp13Connector" javaClass="org.apache.tomcat.modules.server.Ajp13Interceptor"/>
  
  <module name="NSConfig" javaClass="org.apache.tomcat.modules.config.NSConfig"/>
  
  <module name="IISConfig" javaClass="org.apache.tomcat.modules.config.IISConfig"/>
  
  <module name="AutoDeploy" javaClass="org.apache.tomcat.modules.config.AutoDeploy"/>
  
  <module name="ServerXmlReader" javaClass="org.apache.tomcat.modules.config.ServerXmlReader"/>
  
  <module name="LoaderInterceptor11" javaClass="org.apache.tomcat.modules.config.LoaderInterceptor11"/>
  
  <module name="ContextXmlReader" javaClass="org.apache.tomcat.modules.config.ContextXmlReader"/>
  
  <module name="LogSetter" javaClass="org.apache.tomcat.modules.config.LogSetter"/>
  
  <module name="SimpleSessionStore" javaClass="org.apache.tomcat.modules.session.SimpleSessionStore"/>
  
  <module name="SessionIdGenerator" javaClass="org.apache.tomcat.modules.session.SessionIdGenerator"/>
  
  <module name="SessionExpirer" javaClass="org.apache.tomcat.modules.session.SessionExpirer"/>
  
  <module name="SessionId" javaClass="org.apache.tomcat.modules.session.SessionId"/>
  
  <module name="AccountingInterceptor" javaClass="org.apache.tomcat.modules.loggers.AccountingInterceptor"/>
  
  <module name="LogEvents" javaClass="org.apache.tomcat.modules.loggers.LogEvents"/>
  
  <module name="SimpleRealm" javaClass="org.apache.tomcat.modules.aaa.SimpleRealm"/>
  
  <module name="JDBCRealm" javaClass="org.apache.tomcat.modules.aaa.JDBCRealm"/>
  
  <module name="CredentialsInterceptor" javaClass="org.apache.tomcat.modules.aaa.CredentialsInterceptor"/>
  
  <module name="AccessInterceptor" javaClass="org.apache.tomcat.modules.aaa.AccessInterceptor"/>
  
  <module name="AccessLogInterceptor" javaClass="org.apache.tomcat.modules.loggers.AccessLogInterceptor"/>
  
  <module name="InvokerInterceptor" javaClass="org.apache.tomcat.modules.generators.InvokerInterceptor"/>
  
  <module name="ErrorHandler" javaClass="org.apache.tomcat.modules.generators.ErrorHandler"/>
  
  <module name="Jdk12Interceptor" javaClass="org.apache.tomcat.modules.generators.Jdk12Interceptor"/>
  
  <module name="StaticInterceptor" javaClass="org.apache.tomcat.modules.generators.StaticInterceptor"/>
  
  <module name="ReloadInterceptor" javaClass="org.apache.tomcat.modules.mappers.ReloadInterceptor"/>
  
  <module name="DecodeInterceptor" javaClass="org.apache.tomcat.modules.mappers.DecodeInterceptor"/>
  
  <module name="SimpleMapper1" javaClass="org.apache.tomcat.modules.mappers.SimpleMapper1"/>
  
  <module name="WebXmlReader" javaClass="org.apache.tomcat.facade.WebXmlReader"/>
  
  <module name="JspInterceptor" javaClass="org.apache.tomcat.facade.JspInterceptor"/>
  
  <module name="Servlet22Interceptor" javaClass="org.apache.tomcat.facade.Servlet22Interceptor"/>
  
  <module name="LoadOnStartupInterceptor" javaClass="org.apache.tomcat.facade.LoadOnStartupInterceptor"/>
  
  <module name="ProfileLoader" javaClass="org.apache.tomcat.config.ProfileLoader"/>
  
  <module name="TagPoolManagerInterceptor" javaClass="org.apache.tomcat.facade.TagPoolManagerInterceptor"/>
  
  <module name="TrustedLoader" javaClass="org.apache.tomcat.modules.config.TrustedLoader"/>
  </modules>
  
  
  
  1.1                  jakarta-cactus/petals/ant/src/confs/j2ee12/tomcat3x/tomcat-users.xml
  
  Index: tomcat-users.xml
  ===================================================================
  <tomcat-users>
    <user name="testuser" password="testpassword" roles="test" />
  </tomcat-users>
  
  
  
  1.1                  jakarta-cactus/petals/ant/src/confs/j2ee12/tomcat3x/server.xml
  
  Index: server.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <Server>
  
      <ContextManager workDir="work">
  
        <!-- ==================== Global modules ==================== -->
  
          <LogEvents enabled="false" />
  
          <AutoDeploy source="webapps" target="webapps" />
          <AutoWebApp dir="webapps" host="DEFAULT" />
  
          <SimpleMapper1 />
  
          <SessionExpirer checkInterval="60" />
          <SessionIdGenerator randomClass="java.util.Random"
                              randomFile="/dev/urandom" />
  
  
          <!-- ========== context processing modules ========== -->
  
          <!-- This will be the "default" profile
               ( all except the "global" modules can be set per context )
            -->
          <LogSetter name="servlet_log"
  		   timestamps="true"
  		   verbosityLevel = "INFORMATION"
  		   path="servlet-${yyyyMMdd}.log"
  		   />
  
          <LogSetter  name="JASPER_LOG"
  		   timestamps="true"
  		   path="jasper-${yyyyMMdd}.log"
  		   verbosityLevel = "INFORMATION"  />
  
          <LoaderInterceptor11  useApplicationLoader="true" />
  
          <WebXmlReader validate="true" />
  
          <ErrorHandler showDebugInfo="true" />
  
          <WorkDirSetup cleanWorkDir="false" />
  
          <Jdk12Interceptor />
  
          <!-- Non-standard invoker, for backward compat. ( /servlet/* ) -->
          <InvokerInterceptor />
  
          <!-- you can add javaCompiler="jikes" -->
          <JspInterceptor keepGenerated="true"
  			largeFile="false"
  			sendErrToClient="true"
  			useJspServlet="false"
  			/>
  
          <StaticInterceptor  debug="0" listings="true" />
  
          <ReloadInterceptor fullReload="true" />
  
          <SimpleSessionStore maxActiveSessions="-1" />
  
          <AccessInterceptor />
  
          <CredentialsInterceptor />
  
          <SimpleRealm filename="conf/tomcat-users.xml" />
  
          <LoadOnStartupInterceptor />
  
          <Servlet22Interceptor />
  
          <!-- Request processing -->
  
          <DecodeInterceptor debug="0" />
  
          <SessionId cookiesFirst="true" noCookies="false" />
  
        <!-- ==================== Connectors ==================== -->
  
         <!-- new http adapter. Attributes:
                 secure - use SSL ( https )
                 keystore, keypass - certs for SSL
                 port -->
  
          <Http10Connector port="@cactus.port@"
  			   secure="false"
  			   maxThreads="100"
  			   maxSpareThreads="50"
  			   minSpareThreads="10" />
  
          <!-- Note: we use a port different from the standard one (8007) not
               to interfere with an other running tomcat -->
          <Ajp12Connector port="8777" />
  
      </ContextManager>
  </Server>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org