alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Jetty example source code file (checkout.xml)

This example Jetty source code file (checkout.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Jetty tags/keywords

checkout, checkout, copy, cvs, cvs, cvsroot, cvsroot, export, export, glassfish, jasper, meta-inf, note, updates

The Jetty checkout.xml source code

<!-- ================================================================= -->
<!-- Updates the glassfish files in jetty from glassfish cvs           -->
<!-- NOTE: you must have a login for java.net and have used cvs login  -->
<!-- at least once to login to glassfish and set up the .cvspass file. -->
<!-- ================================================================= -->
<project name="Glassfish Jasper" default="update" basedir=".">
    <property name="generated.srcs" value="target/generated-sources/main"/>
    <property name="generated.java" value="${generated.srcs}/java"/>
    <property name="generated.resources" value="${generated.srcs}/resources"/>

    <!-- ============================================================== -->
    <!-- Clean a previous export/checkout                               -->
    <!-- ============================================================== -->
     <target name="clean">
       <delete dir="target/glassfish" quiet="true"/>
     </target>

    <!-- ============================================================== -->
    <!-- Ceck if files already exported/checked out                     -->
    <!-- ============================================================== -->
    <target name="uptodate">
      
      <condition property="export.required">
        <not>
          <and>
            <available file="${generated.java}/org/apache/jasper/JspC.java" type="file" property="src.present"/>
            <available file="${generated.resources}/org/apache/jasper/resources/messages.properties" type="file" property="resources.present"/>
          </and>
        </not>
      </condition>
    </target>

    <target name="test-export" depends="uptodate">
       <condition property="export.args.ok">
         <and>
           <not>
           <not>
         </and>
       </condition>
       <condition property="export.checks.ok">
         <and>
           <isset property="export.args.ok"/>
           <isset property="export.required"/> 
         </and>
       </condition>
    </target>


    <target name="test-checkout" depends="uptodate">
       <condition property="checkout.args.ok">
         <and>
           <not>
           <equals arg1="${glassfish.tag}" arg2="" trim="true"/>
         </and>
       </condition>
       <echo message="checkout.args.ok=${checkout.args.ok} and export.required=${export.required}"/>
       <condition property="checkout.checks.ok">
         <and>
           <isset property="checkout.args.ok"/>
           <isset property="export.required"/> 
         </and>
       </condition>
       <echo message="checkout.checks.ok=${checkout.checks.ok}"/>
    </target>


    <!-- ============================================================== -->
    <!-- Export the selected directories from glassfish                 -->
    <!-- ============================================================== -->
    <target name="export" description="Export src from glassfish" depends="test-export" if="export.checks.ok">
       <cvspass cvsroot=":pserver:guest@cvs.dev.java.net:/cvs" password="" />
       <property name="CVSROOT" value=":pserver:guest@cvs.dev.java.net:/cvs"/>
       <cvs command="export -r ${glassfish.tag}" package="glassfish/appserv-webtier/src/java/com" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="export -r ${glassfish.tag}" package="glassfish/appserv-webtier/src/java/org/apache/jasper" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="export -r ${glassfish.tag}" package="glassfish/appserv-jstl/conf/" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="export -r ${glassfish.tag}" package="glassfish/appserv-jstl/src/org" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="export -r ${glassfish.tag}" package="glassfish/common-util/src/java/" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="export -r ${glassfish.tag}" package="glassfish/pwc-commons/src/java/" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <property name="export.done" value="true"/>
   </target>

    <!-- ============================================================== -->
    <!-- Checkout the src from glassfish                                -->
    <!-- ============================================================== -->
    <target name="checkout" description="Checkout src from glassfish" depends="test-checkout" if="checkout.checks.ok">
       <cvspass cvsroot=":pserver:guest@cvs.dev.java.net:/cvs" password="" />
       <property name="CVSROOT" value=":pserver:guest@cvs.dev.java.net:/cvs"/>
       <cvs command="co" package="glassfish/appserv-webtier/src/java/com" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="co" package="glassfish/appserv-webtier/src/java/org/apache/jasper" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="co" package="glassfish/appserv-jstl/conf/" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="co" package="glassfish/appserv-jstl/src/org" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="co" package="glassfish/common-util/src/java/" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <cvs command="co" package="glassfish/pwc-commons/src/java/" dest="target" cvsRoot="${CVSROOT}" failonerror="true" />
       <property name="checkout.done" value="true"/>
   </target>


    <!-- ============================================================== -->
    <!-- Copy the required directories to src                           -->
    <!-- ============================================================== -->
   <target name="update" description="Copy selected exported glassfish files">
     <available file="target/glassfish" type="dir" property="src.exists"/>
     <fail unless="src.exists"/>
     <copy todir="${generated.java}/com/sun/appserv">
      <fileset dir="target/glassfish/common-util/src/java/com/sun/appserv">
        <exclude name="**/CVS/*"/>
        <exclude name="ha/**"/>
      </fileset>
     </copy>
     <copy todir="${generated.java}/com/sun/common">
      <fileset dir="target/glassfish/common-util/src/java/com/sun/common">
        <exclude name="**/CVS/*"/>
      </fileset>
     </copy>
    <copy todir="${generated.java}/com/sun/el">
      <fileset dir="target/glassfish/appserv-webtier/src/java/com/sun/el">
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>
    <copy todir="${generated.java}/org/apache/jasper">
      <fileset dir="target/glassfish/appserv-webtier/src/java/org/apache/jasper">
        <exclude name="**/resources/*"/>
        <exclude name="**/CVS/*"/>
        <exclude name="**/Jsr199JavaCompiler.java"/>
        <!-- exclude name="**/JDTJavaCompiler.java"/ -->
      </fileset>
    </copy>
    <copy todir="${generated.resources}/org/apache/jasper/resources">
      <fileset dir="target/glassfish/appserv-webtier/src/java/org/apache/jasper/resources">
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>

    <copy todir="${generated.java}/com/sun/enterprise/web/io">
      <fileset dir="target/glassfish/pwc-commons/src/java/com/sun/enterprise/web/io">
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>

    <copy todir="${generated.java}/org/apache/taglibs">
      <fileset dir="target/glassfish/appserv-jstl/src/org/apache/taglibs">
        <exclude name="**/*.properties"/>
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>

    <copy todir="${generated.resources}/org/apache/taglibs/standard/lang/jstl">
      <fileset dir="target/glassfish/appserv-jstl/src/org/apache/taglibs/standard/lang/jstl">
        <include name="**/*.properties"/>
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>

    <copy todir="${generated.resources}/org/apache/taglibs/standard/resources/">
      <fileset dir="target/glassfish/appserv-jstl/src/org/apache/taglibs/standard/resources/">
        <include name="**/*.properties"/>
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>

    <copy todir="${generated.resources}/META-INF">
      <fileset dir="target/glassfish/appserv-jstl/conf">
        <include name="**/*.tld"/>
      </fileset>
    </copy>

    <copy todir="${generated.resources}/com/sun/el">
      <fileset dir="target/glassfish/appserv-webtier/src/java/com/sun/el">
        <include name="Messages.properties"/>
        <exclude name="**/CVS/*"/>
      </fileset>
    </copy>
   </target>

    <!-- ============================================================== -->
    <!-- Export the src and copy selected bits to src/main/             -->
    <!-- ============================================================== -->
  <target name="export-update" description="Export the src and copy selected files to the src/main/java dir" depends="export,update"/>

    <!-- ============================================================== -->
    <!-- Checkout the src and copy selected bits to src/main/             -->
    <!-- ============================================================== -->
  <target name="checkout-update" description="Checkout the src and copy selected files to the src/main/java dir" depends="checkout,update"/>

    <!-- ============================================================== -->
    <!-- Export or Checkout the src and copy selected bits to src/main/ -->
    <!-- The intent is to do either a checkout or an update, depending  -->
    <!-- on whether a cvs tag has been provided or not.                 -->
    <!-- ============================================================== -->
  <target name="extract-src" description="Export src if glassfish.tag is set, otherwise do a checkout of head" depends="export,checkout,update">
  </target>


</project>

Other Jetty examples (source code examples)

Here is a short list of links related to this Jetty checkout.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.