Skip to main content

Source code file content

Revision: 57029

GLASSFISH-18987 Remove call to getService in critical path
» Project Revision History

» Checkout URL

svn / tags / source-build-3.1.1 / scripts / servlet-2.5-build.xml

Size: 3290 bytes, 1 line
<project name="servlet-2.5" default="build" basedir="..">

  <!-- import build.xml for init target and inherited properties -->
  <import file="${basedir}/build.xml"/>
 
  <target name="init.servlet-2.5">
     <property name="project_name"   value="servlet-2.5"/>
     <property name="release.version"   value="2.5"/>
     <property name="work.dir"  value="${glassfish.external.dir}/${project_name}"/>
     <property name="src.dir" value="${work.dir}"/>
     <property name="servlet-jarfile" value="${work.dir}/dist/${project_name}.jar"/>
     <mkdir dir="${work.dir}"/>
     <mkdir dir="${work.dir}/classes"/>
     <mkdir dir="${work.dir}/dist"/>
    <condition property="isServlet2" value="true">
        <contains string="${javax.servlet-api.version}" stubstring="2."/>
    </condition>
  </target>

  <!-- CLEAN TARGET -->
  <target name="clean" depends="init">
    <delete dir="${work.dir}/classes"/>
    <delete dir="${work.dir}/manifest"/>
    <delete dir="${work.dir}/dist"/>
  </target>

  <!-- CHECKOUT TARGET -->
  <target name="checkout" depends="init,check.svn" if="isServlet2" unless="skipCheckout">
      <svn.checkout repo="${servlet.svn.url}" dest="servlet-2.5"/>
  </target>

  <target name="build" depends="checkout" if="isServlet2">
        <antcall target="make_jar"/>
  </target>

  <!-- COMPILE TARGET -->
  <target name="compile" depends="init.servlet-2.5, checkout">
    <javac destdir="${work.dir}/classes" source="1.4" target="1.4">
        <src path="${src.dir}/src/share"/>
      <include name="**/*.java"/>
    </javac>

    <!-- Add Associated property files -->
    <copy todir="${work.dir}/classes">
        <fileset dir="${src.dir}/src/share">
          <include name="**/*.properties"/>
        </fileset>
    </copy>

    <!-- Add Servlet resources -->
    <copy todir="${work.dir}/classes/javax/servlet/resources">
        <fileset dir="${src.dir}/src/share/dtd" includes="*.dtd,*.xsd">
          <exclude name="jsp*.dtd"/>
          <exclude name="web-jsp*.dtd"/>
        </fileset>
    </copy>

  </target>

  <!-- Prepare manifest files for jars -->
  <target name="cook-manifest"
          description="Generate MANIFEST.MF files">
      <copy todir="${work.dir}/manifest">
          <fileset dir="${src.dir}" includes="*.mf" />
          <filterset>
              <filter token="VERSION" value="${release.version}"/>
          </filterset>
      </copy>
  </target>

  <!-- MAKE JAR TARGET -->
  <target name="make_jar" depends="compile, cook-manifest">
      <!-- Prepare manifest files for jars -->
      <copy todir="${work.dir}/manifest">
          <fileset dir="${src.dir}" includes="*.mf" />
          <filterset>
              <filter token="VERSION" value="${release.version}"/>
          </filterset>
      </copy>

    <jar basedir="${work.dir}/classes" 
         jarfile="${servlet-jarfile}" 
         manifest="${work.dir}/manifest/servlet-api.mf"
         includes="**/*.*"/>
    <antcall target="servlet-2.5.publish" />
  </target>


  <target name="servlet-2.5.publish" >
      <echo message="Publishing servlet-2.5"/>
      <mvn.publish.local
             file="${servlet-jarfile}"
             mvngroup="javax.servlet"
             mvnartid="servlet-api"
             mvnversion="${servlet-api.version}"/>
  </target>

</project>

 
 
Close
loading
Please Confirm
Close