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 / branches / v2_3.1.1 / cmp / build.xml

Size: 5488 bytes, 1 line
<?xml version='1.0' encoding='ISO-8859-1' ?>

 Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 The contents of this file are subject to the terms of either the GNU
 General Public License Version 2 only ("GPL") or the Common Development
 and Distribution License("CDDL") (collectively, the "License").  You
 may not use this file except in compliance with the License. You can obtain
 a copy of the License at
 or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
 language governing permissions and limitations under the License.
 When distributing the software, include this License Header Notice in each
 file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
 Sun designates this particular file as subject to the "Classpath" exception
 as provided by Sun in the GPL Version 2 section of the License file that
 accompanied this code.  If applicable, add the following below the License
 Header, with the fields enclosed by brackets [] replaced by your own
 identifying information: "Portions Copyrighted [year]
 [name of copyright owner]"
 If you wish your version of this file to be governed by only the CDDL or
 only the GPL Version 2, indicate your decision by adding "[Contributor]
 elects to include this software in this distribution under the [CDDL or GPL
 Version 2] license."  If you don't indicate a single choice of license, a
 recipient has the option to distribute your version of this file under
 either the CDDL, the GPL Version 2 or to extend the choice of license to
 its licensees as provided above.  However, if you add GPL Version 2 code
 and therefore, elected the GPL Version 2 license, then the option applies
 only if the new code is made subject to such option by the copyright

<project name="cmp" default="all" basedir=".">

  <!-- Ignore the environment's $CLASSPATH. -->
  <property name="build.sysclasspath" value="ignore"/>

  <property name="" value="cmp"/>

  <property file="${user.home}/"/>
  <property file="${basedir}/../bootstrap/"/>

  <property name="buildroot"               location="${basedir}/release/build"/>
  <property name="generator_database_root" location="${basedir}/generator/database"/>
  <property name="mapping_ejb_root"        location="${basedir}/mapping/ejb"/>
  <property name="support_root"            location="${basedir}/support"/>
  <property name="util_root"               location="${basedir}/utility"/>

  <!-- The order of these submodules is important for dependencies -->
  <property name="submodules" value="utility, model, mapping, generator, enhancer, support"/>

  <!-- jars.dir is where jars are built, to be later published. -->
  <property name="jars.dir" value="${basedir}/jars"/>

  <property name="persistence-rt.jar.path"
  <property name="persistence-mapping-ejb.jar.path"
  <property name="persistence-generator-database.jar.path"

  <taskdef name="for-each" classname="org.netbeans.nbbuild.ForEach" classpath="${buildroot}/nbantext.jar"/>

  <!-- Main targets. -->

  <!-- This is the default target. -->
  <target name="all">
    <antcall target="support.rtjar"/>
    <antcall target="mapping.ejb.jar"/>
    <antcall target="generator.database.jar"/>
    <antcall target="assemble"/>

  <!-- build -->
  <target name="build" depends="all"/>

  <target name="clean">
    <for-each locations="${submodules}"/>
    <delete dir="${jars.dir}"/>

  <target name="clobber" depends="clean">
    <delete file="${appserv-cmp.jar}"/>

  <!-- Internal targets. -->

  <!-- This will create the non-appserv specific rt jar components -->
  <!-- in the support dir.    -->
  <target name="support.rtjar">
    <ant dir="${support_root}" target="jars"/>

  <!-- This will create persistence-mapping-ejb.jar -->
  <target name="mapping.ejb.jar">
    <ant dir="${mapping_ejb_root}" target="jars"/>

  <!-- This will create persistence-generator-database.jar -->
  <target name="generator.database.jar">
    <ant dir="${generator_database_root}" target="jars"/>

  <!-- Publish appserv-cmp.jar file. -->
  <target name="assemble">
    <echo message="Create appserv-cmp.jar with CMP implementation files"/>

    <delete dir="${jars.dir}/cmp_temp"/>
    <mkdir dir="${jars.dir}/cmp_temp"/>

    <unjar src="${persistence-rt.jar.path}" dest="${jars.dir}/cmp_temp" overwrite="true"/>
    <unjar src="${persistence-mapping-ejb.jar.path}" dest="${jars.dir}/cmp_temp" overwrite="true"/>
    <unjar src="${persistence-generator-database.jar.path}" dest="${jars.dir}/cmp_temp" overwrite="true"/>

    <!-- XXX Re-create appserv-cmp.jar from scratch, as maven build corrupts MANIFEST when updating jar -->
    <delete file="${appserv-cmp.jar}"/>

    <jar destfile="${appserv-cmp.jar}" manifest="${basedir}/">
      <fileset dir="${jars.dir}/cmp_temp">
          <include name="**/*.class"/>
          <include name="**/*.properties"/>

    <echo message="Done creating appserv-cmp.jar"/>
Please Confirm