You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/04/17 13:57:39 UTC

cvs commit: jakarta-tomcat-5/resources/deployer deployer.xml

remm        2003/04/17 04:57:39

  Modified:    .        .cvsignore build.xml
  Added:       resources/deployer deployer.xml
  Log:
  - Add the embyo for the deployer.
  - The Ant script is not functional yet.
  
  Revision  Changes    Path
  1.5       +2 -0      jakarta-tomcat-5/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/.cvsignore,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- .cvsignore	11 Mar 2003 17:21:15 -0000	1.4
  +++ .cvsignore	17 Apr 2003 11:57:38 -0000	1.5
  @@ -1,4 +1,6 @@
   build
  +compat
  +deployer
   embed
   dist
   release
  
  
  
  1.121     +63 -5     jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- build.xml	12 Apr 2003 15:09:47 -0000	1.120
  +++ build.xml	17 Apr 2003 11:57:38 -0000	1.121
  @@ -48,6 +48,8 @@
   
     <property name="tomcat.dist"      value="${basedir}/dist"/>
     <property name="tomcat.embed"     value="${basedir}/embed"/>
  +  <property name="tomcat.compat"    value="${basedir}/compat"/>
  +  <property name="tomcat.deployer"  value="${basedir}/deployer"/>
     <property name="tomcat.release"   value="${basedir}/release"/>
     <property name="webapps.build"    value="${catalina.home}/webapps/build"/>
     <property name="webapps.dist"     value="${catalina.home}/webapps/dist"/>
  @@ -135,8 +137,9 @@
             todir="${tomcat.build}/common/lib"/>
   
       <copy todir="${tomcat.build}/common/lib" file="${commons-logging-api.jar}" />
  -    <copy todir="${tomcat.build}/common/lib" file="${jmx.jar}" />
  -    <copy todir="${tomcat.build}/common/lib" file="${jmx-tools.jar}" />
  +    <copy tofile="${tomcat.build}/common/lib/jmx.jar" file="${jmx.jar}" />
  +    <copy tofile="${tomcat.build}/common/lib/jmx-tools.jar" 
  +          file="${jmx-tools.jar}" />
       <copy todir="${tomcat.build}/server/lib" file="${commons-logging.jar}" />
       <copy todir="${tomcat.build}/server/lib" file="${commons-modeler.jar}" />
     </target>
  @@ -439,7 +442,6 @@
       <copy file="${commons-digester.jar}" todir="${tomcat.build}/server/lib"/>
       <copy file="${commons-collections.jar}" todir="${tomcat.build}/common/lib"/>
       <copy file="${commons-beanutils.jar}" todir="${tomcat.build}/common/lib"/>
  -    <copy file="${jmx.jar}" todir="${tomcat.build}/common/lib"/>
   
       <antcall target="build-tomcatutil"/>
       <antcall target="build-catalina"/>
  @@ -484,8 +486,8 @@
       </ant>
     </target>
   
  -  <target name="build-all" depends="init,deploy-static,build,build-webapps,embed" 
  -          description="build tomcat, webapps, embed" />
  +  <target name="build-all" depends="init,deploy-static,build,build-webapps,embed,compat,deployer" 
  +          description="build tomcat, webapps, embed, compat, deployer" />
   
   
     <target name="build-depends" depends="init"
  @@ -709,6 +711,60 @@
       
     </target>
   
  +  <!-- ====================== Deployer target =================== -->
  +
  +  <target name="deployer" description="Create the Tomcat deployer binary" > 
  +
  +    <copy todir="${tomcat.deployer}/lib" file="${commons-logging.jar}"/>
  +    <copy todir="${tomcat.deployer}/lib" file="${tomcat.build}/common/lib/ant.jar"/>
  +
  +    <!-- JSP and Servlet runtime -->
  +    <copy todir="${tomcat.deployer}/lib">
  +      <fileset dir="${tomcat.build}/common/lib">
  +        <include name="commons-el.jar"/>
  +        <include name="jsp-api.jar"/>
  +        <include name="jasper-runtime.jar"/>
  +        <include name="jasper-compiler.jar"/>
  +        <include name="servlet-api.jar"/>
  +      </fileset>
  +    </copy>
  +
  +    <copy todir="${tomcat.deployer}/lib" 
  +           file="${tomcat.build}/server/lib/catalina-ant.jar"/>
  +
  +<!--
  +    <copy todir="${tomcat.deployer}/lib" 
  +           file="${tomcat.build}/server/lib/catalina-deployer.jar"/>
  +-->
  +
  +    <copy todir="${tomcat.deployer}/lib" file="${xercesImpl.jar}"/>
  +    <copy todir="${tomcat.deployer}/lib" file="${xmlParserAPIs.jar}"/>
  +
  +    <copy todir="${tomcat.deployer}">
  +      <fileset dir="${basedir}/resources/deployer" />
  +    </copy>
  +
  +    <!-- Copy deployer documentation -->
  +    <copy todir="${tomcat.deployer}">
  +      <fileset dir="${tomcat.build}/webapps/tomcat-docs">
  +        <include name="images/jakarta-logo.gif" />
  +        <include name="images/tomcat.gif" />
  +      </fileset>
  +    </copy>
  +    <copy tofile="${tomcat.deployer}/docs/manual.html"
  +      file="${tomcat.build}/webapps/tomcat-docs/printer/deployer-howto.html" />
  +
  +  </target>
  +
  +  <!-- ====================== Compat target =================== -->
  +
  +  <target name="compat" description="Create compatibility binaries for JREs before 1.4" >
  +
  +    <copy todir="${tomcat.compat}/common/endorsed" file="${xercesImpl.jar}"/>
  +    <copy todir="${tomcat.compat}/common/endorsed" file="${xmlParserAPIs.jar}"/>
  +
  +  </target>
  +
     <!-- ====================== DEPLOY: Deploy Components =================== -->
   
     <target name="deploy" depends="deploy-static,build-all,build-webapps"
  @@ -767,6 +823,8 @@
       <delete dir="${tomcat.build}"/>
   
       <delete dir="${tomcat.embed}"/>
  +    <delete dir="${tomcat.compat}"/>
  +    <delete dir="${tomcat.deployer}"/>
   
       <echo>Target: Servlet API - Clean ...</echo>
       <ant dir="${api.home}/jsr154" target="clean"/>
  
  
  
  1.1                  jakarta-tomcat-5/resources/deployer/deployer.xml
  
  Index: deployer.xml
  ===================================================================
  <project name="Deployer" default="deploy" basedir=".">
  
    <!-- Configure the directory into which the web application is built -->
    <property name="build"    value="${basedir}/build"/>
  
    <!-- Configure the folder and context path for this application -->
    <property name="webapp"   value="myapp"/>
    <property name="path"     value="/myapp"/>
  
    <!-- Configure properties to access the Manager application -->
    <property name="url"      value="http://localhost:8080/manager"/>
    <property name="username" value="myusername"/>
    <property name="password" value="mypassword"/>
  
    <property name="webapp.path"     value="${build}/webapp${path}"/>
  
    <classpath id="deployer.classpath">
      <fileset dir="${basedir}/lib">
        <include name="*.jar"/>
      </fileset>
    </classpath>
  
    <!-- Configure the custom Ant tasks for the Manager application -->
    <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="install"   classname="org.apache.catalina.ant.InstallTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="list"      classname="org.apache.catalina.ant.ListTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="remove"    classname="org.apache.catalina.ant.RemoveTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="start"     classname="org.apache.catalina.ant.StartTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask">
      <classpath refid="deployer.classpath" />
    </taskdef>
    <taskdef name="jasper2"   classname="org.apache.jasper.JspC" > 
      <classpath refid="deployer.classpath" />
    </taskdef>
  
    <!-- Executable Targets -->
    <target name="clean" description="Removes build directory">
      <delete dir="${build}" />
    </target>
  
    <target name="compile" description="Compile web application"
            depends="clean">
  
      <copy todir="${webapp.path}">
        <fileset dir="${webapp}" />
      </copy>
  
      <jasper2 validateXml="false" 
               uriroot="${webapp.path}" 
               webXml="${webapp.path}/WEB-INF/generated_web.xml"
               addWebXmlMappings="true"
               outputDir="${webapp.path}/WEB-INF/classes" /> 
  
      <mkdir dir="${webapp.path}/WEB-INF/classes"/>
      <mkdir dir="${webapp.path}/WEB-INF/lib"/>
  
      <javac destdir="${webapp.path}/WEB-INF/classes"
             optimize="off"
             debug="on" failonerror="false"
             srcdir="${webapp.path}/WEB-INF/classes" 
  	   excludes="**/*.smap">
        <classpath>
          <fileset dir="${webapp.path}/WEB-INF/lib">
            <include name="*.jar"/>
          </fileset>
        </classpath>
        <include name="**" />
        <exclude name="tags/**" />
      </javac>
  
      <jar destfile="${webapp.path}.war"
           basedir="${webapp.path}" />
  
      <antcall target="deploy">
        <param name="war" value="${webapp.path}.war" />
      </antcall>
  
    </target>
  
    <target name="deploy" description="Compile and deploy web application">
      <deploy url="${url}" username="${username}" password="${password}"
              path="${path}" war="${war}"/>
    </target>
  
    <target name="reload" description="Reload web application"
            depends="compile">
      <reload  url="${url}" username="${username}" password="${password}"
              path="${path}"/>
    </target>
  
    <target name="remove" description="Remove web application">
      <remove url="${url}" username="${username}" password="${password}"
              path="${path}"/>
    </target>
  
  
  </project>
  
  

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