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 / gfv3-prelude-b21 / packager / package-common.xml

Size: 5279 bytes, 1 line
<!--
 Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 Use is subject to license terms.
-->

<property name="packager.jar" 
          value="${publish.home}/packager/lib/packager.jar"/>


<!-- init-common. Common initialization involves creating publishing 
   - directories and OS specific targets. 
--> 
<target name="init-common"
    description="Module initialization">
    <tstamp>
        <format property="start.time" pattern="MM/dd/yyyy hh:mm aa"/>
    </tstamp>    
    <condition property="windows">
      <os family="windows" />
    </condition>
    <condition property="unix">
      <os family="unix" />
    </condition>
    <condition property="solaris">
        <equals arg1="${os.name}" arg2="SunOS"/>
    </condition>
    <condition property="linux">
        <equals arg1="${os.name}" arg2="Linux"/>
    </condition>
    <condition property="mac">
        <os name="Mac OS X"/>
    </condition>
    <condition property="aix">
        <os name="AIX"/>
    </condition>
    <condition property="macoraix">
	<or>
        <os name="Mac OS X"/>
        <os name="AIX"/>
	</or>
    </condition>
    <echo message="Building component ${component.name}"/>
    <mkdir dir="${publish.package.home}"/>
</target>




<target name="package-common" 
    depends="init-common, create-zip-filelist, package-solaris-common"/>

<target name="package-solaris-common" if="solaris" 
        description="create solaris specific packaging">
   <zip zipfile="${publish.package.home}/${component.package}.zip" 
        basedir="${component.publish.home}" 
        includesfile="${package.home}/${component.package}/prototype_com.zip.solaris"
        whenempty="fail">            
   </zip>

</target>

<target name="build-solaris-package" if="solarissvr4build" 
        description="create solaris package">

<ant antfile="build.xml" dir="${package.home}/${component.package}" target="create-pkgs"
             inheritAll="true">
</ant>
</target>

<target name="create-zip-filelist"
    description="Create zip file listing">
    <echo message="create zip file using ${packager.jar}"/>
    <java classname="com.sun.appserv.internal.build.util.SVR4PackageDefToFileList"
          dir="${package.home}/${component.package}"
          fork="true"
          failonerror="true">
        <classpath>
            <pathelement location="${packager.jar}"/>
        </classpath>
        <arg value="SVR4PackageDefToFileList.xml"/>
    </java>
</target>

<target name="create-prototype-com"
    description="Create Package file listing">
    <echo message="Create Dynamic prototype_com file"/>
    <java classname="gfv3ips.Main"
          dir="${package.home}/${component.package}"
          fork="true"
          output="${package.home}/${component.package}/prototype_com"
          failonerror="true">
        <classpath>
            <pathelement location="${component.classes.dir}"/>
        </classpath>
        <arg value="${repo.home}"/>
        <arg value="${pkgname}"/>
    </java>
</target>

<target name="push-package" depends="check-ips"
    description="Push Package ${pkgname} to ${REPO_URL}">
    <echo message="Push Package ${pkg.dir}/${pkgname} to ${REPO_URL}"/>
    <exec dir="${pkg.dir}" executable="pkgsend" failonerror="true">
        <arg line="-s ${REPO_URL} send ${pkgname}" />
    </exec>
</target>

<target name="update-cfg-cache" depends="check-ips">
    <echo message="Updating cfg_cache in local IPS image with ${REPO_URL}"/>
    <available file="${image_cache}" property="cache.present"/>
    <fail message="${image_cache} File NOT present, call create-local-image target first" unless="cache.present"/>
    <echo file="${image_cache}" append="true">origin-for-windows-i386 = ${REPO_HOST}/dev/windows/gf3000_2000/${line.separator}</echo>
    <echo file="${image_cache}" append="true">origin-for-sunos-i386 = ${REPO_HOST}/dev/solaris-x86/gf3000_2000/${line.separator}</echo>
    <echo file="${image_cache}" append="true">origin-for-sunos-sparc = ${REPO_HOST}/dev/solaris-sparc/gf3000_2000/${line.separator}</echo>
    <echo file="${image_cache}" append="true">origin-for-linux-i386 = ${REPO_HOST}/dev/linux/gf3000_2000/${line.separator}</echo>
    <echo file="${image_cache}" append="true">origin-for-darwin-universal = ${REPO_HOST}/dev/mac/gf3000_2000/${line.separator}</echo>
</target>

<target name="create-local-image" depends="check-ips"
    description="Create local IPS image using ${REPO_URL}">
    <echo message="Creating local IPS image for ${REPO_URL}"/>
    <mkdir dir="${image.dir}"/>
    <exec executable="pkg" failonerror="true">
        <arg line="image-create -U -a ${authority}=${REPO_URL} ${image.dir}" />
    </exec>
    <exec dir="${image.dir}" executable="pkg" failonerror="true">
        <arg line="refresh" />
    </exec>
</target>

<target name="install-package" depends="check-ips"
    description="Install Package ${pkgname} from ${REPO_URL}">
    <echo message="Install Package ${pkgname} from ${REPO_URL}"/>
    <exec dir="${image.dir}" executable="pkg" failonerror="true">
        <arg line="install ${pkgname}" />
    </exec>
</target>

<target name="check-ips">
    <available file="pkg" property="ips.present"/>
    <!-- fail message="Install IPS/UC2.0 Client having pkg, pkgsend commands" unless="ips.present"/ -->
</target>
 
 
Close
loading
Please Confirm
Close