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 jr...@apache.org on 2003/01/30 14:54:00 UTC

cvs commit: jakarta-cactus/Eclipse-Plugin/src/scripts build-war.xml

jruaux      2003/01/30 05:54:00

  Added:       Eclipse-Plugin/src/scripts build-war.xml
  Log:
  Added Eclipse-plugin specific Ant script
  
  Revision  Changes    Path
  1.1                  jakarta-cactus/Eclipse-Plugin/src/scripts/build-war.xml
  
  Index: build-war.xml
  ===================================================================
  <?xml version="1.0"?>
  <project name="Cactus War builder" default="testwar"
      basedir="..">
  
      <!-- Global project properties -->
      <property name="project.name.text" value="Cactus Servlet Sample"/>
      <property name="project.name.file" value="sample-servlet"/>
      <property name="project.version" value="1.4b1"/>
  
      <!-- Prefix to add to all distributable files -->
      <property name="project.prefix" value="jakarta-"/>
  
      <!-- Generic properties -->
      <property name="year" value="2000-2003"/>
      <property name="debug" value="on"/>
      <property name="optimize" value="off"/>
      <property name="deprecation" value="off"/>
  
      <!--
         ========================================================================
           Base directory for all file related operations
         ========================================================================
      -->
      <property name="base.dir" value="."/>
  
      <!--
         ========================================================================
           Set the properties related to the source tree.
         ========================================================================
      -->
      <property name="src.dir" value="${base.dir}/src"/>
      <property name="build.dir" value="${base.dir}/build"/>
      <property name="conf.dir" value="${base.dir}/conf"/>
      <property name="conf.test.dir" value="${conf.dir}/test"/>
      <property name="web.dir" value="${base.dir}/web"/>
  
      <!--
         ========================================================================
           Set the properties related to the target area
         ========================================================================
      -->
      <!-- Destination locations for the build -->
      <property name="target.dir" value="${base.dir}/target"/>
      <property name="target.classes.dir" value="${target.dir}/classes"/>
      <property name="target.conf.dir" value="${target.dir}/conf"/>
      <property name="target.conf.client.dir" value="${target.conf.dir}/client"/>
      <property name="target.conf.server.dir" value="${target.conf.dir}/server"/>
      <property name="target.doc.dir" value="${target.dir}/doc"/>
      <property name="target.doc.api.dir" value="${target.doc.dir}/api"/>
      <property name="target.test.dir" value="${target.dir}/test"/>
      <property name="target.lib.dir" value="${target.dir}/lib"/>
  
      <!-- Distribution directory, i.e. where the expanded distibutable files
           are located -->
      <property name="dist.dir" value="${base.dir}/dist"/>
      <property name="dist.bin.dir" value="${dist.dir}/bin"/>
      <property name="dist.doc.dir" value="${dist.dir}/doc"/>
      <property name="dist.doc.api.dir" value="${dist.doc.dir}/api"/>
  
      <!--
         ========================================================================
           Default values that can be overidden
         ========================================================================
      -->
      <!-- The port that will be used to start the servers -->
      <property name="test.port" value="8080"/>
  
      <!--
         ========================================================================
          Names of deliverables
         ========================================================================
      -->
      <!-- The Sample war -->
      <property name="sample.war.name" value="${project.name.file}"/>
  
      <!--
         ========================================================================
           Useful patterns for targets
         ========================================================================
      -->
      <path id="project.class.path">
  
          <pathelement location="${cactus.framework.jar}"/>
          <pathelement location="${cactus.ant.jar}"/>
          <pathelement location="${servlet.jar}"/>
          <pathelement location="${log4j.jar}"/>
          <pathelement location="${commons.logging.jar}"/>
          <pathelement location="${commons.httpclient.jar}"/>
          <pathelement location="${httpunit.jar}"/>
          <pathelement location="${junit.jar}"/>
          <pathelement location="${aspectjrt.jar}"/>
  
          <!-- Includes system classpath for jars that are in ANT_HOME/lib such
               as aspectrt.jar, etc -->
          <pathelement path="${java.class.path}"/>
      </path>
  
      <!--
         ========================================================================
           Create a Cactus test war file for the sample application.
         ========================================================================
      -->
  	<target name="testwar" depends="user.testwar, default.testwar"/>
  
      <target name="user.testwar" if="user.webfiles.dir">
  
          <!-- Make sure the directory for the war exist -->
          <mkdir dir="${target.test.dir}"/>
  
          <!-- Create the war file -->
          <war warfile="${war.path}"
               webxml="${webxml.path}">
  
              <classes dir="${classes.dir}"/>
  
              <!-- log_server.properties need to be in the server classpath -->
              <classes dir="${classes.dir}">
                  <include name="log4j.properties"/>
              </classes>
  
              <!-- We need to copy all dependent jar in the war. This is
                   because if we just put these jars in the global classpath for
                   the Servlet engine, the Cactus jar might not be able to load
                   the test case class as it may be loadable only by the war
                   classloader -->
              <lib dir="${jars.dir}"/>
  
              <fileset dir="${webfiles.dir}"/>
              <fileset dir="${user.webfiles.dir}"/>
         </war>
  
      </target>
  
      <target name="default.testwar" unless="user.webfiles.dir">
  
          <!-- Make sure the directory for the war exist -->
          <mkdir dir="${target.test.dir}"/>
  
          <!-- Create the war file -->
          <war warfile="${war.path}"
               webxml="${webxml.path}">
  
              <classes dir="${classes.dir}"/>
  
              <!-- log_server.properties need to be in the server classpath -->
              <classes dir="${classes.dir}">
                  <include name="log4j.properties"/>
              </classes>
  
              <!-- We need to copy all dependent jar in the war. This is
                   because if we just put these jars in the global classpath for
                   the Servlet engine, the Cactus jar might not be able to load
                   the test case class as it may be loadable only by the war
                   classloader -->
              <lib dir="${jars.dir}"/>
  
              <fileset dir="${webfiles.dir}"/>
         </war>
  
      </target>
  
  </project>
  
  
  

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