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 / preview2-b10c / packager / package.xml

Size: 12824 bytes, 1 line
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
 Copyright 2006 Sun Microsystems, Inc. All rights reserved.
 Use is subject to license terms.
-->

<!-- Note that package-glassfishv3-ejb should come before -web because
  the ips steps depend on unzipped directories left behind by the later 
  packaging targets.
-->
<target name="package" 
        depends="
		 package-glassfishv3-ejb,
		 package-glassfishv3-nucleus,
		 package-glassfishv3-web,
		 package-glassfishv3-common,
		 package-javadb,
		 clean-tmp" >
</target>

<target name="clean-tmp" depends="publish-init"> 
    <echo message="deleting install_tmp directory"/>
    <exec dir="." executable="rm">
    	<arg line="-rf ${install.tmp.dir}"/>
    </exec>
    <echo message="deleting asman_tmp directory"/>
    <exec dir="." executable="rm">
    	<arg line="-rf ${asman.tmp.dir}"/>
    </exec>
    <exec dir="." executable="rm">
    	<arg line="-rf ${asdem.tmp.dir}"/>
    </exec>
</target>

<target name="package-glassfishv3-nucleus" 
        depends="publish-init,package-install-init"
        description="Package glassfishv3-nucleus">

    <!-- resolveArtifact artifactId="nucleus" property="nucleus.zip"/>
    <resolveArtifact artifactId="web" property="web.zip"/>
    <echo message="web.zip: ${web.zip}, nucleus.zip: ${nucleus.zip}"/ -->

    <echo message="Creating package glassfishv3-nucleus..."/>

    <mkdir dir="${basedir}/build" />
    <unzip src="${basedir}/../distributions/nucleus/target/nucleus.zip"
	    dest="${basedir}/build"/>

    <!-- override asenv files -->

    <copy file="${basedir}/misc/asenv.conf"
	    todir="${basedir}/build/glassfish/config" overwrite="true"/>
    <copy file="${basedir}/misc/asenv.bat"
	    todir="${basedir}/build/glassfish/config" overwrite="true"/>


    <antcall target="create-prototype-com">
        <param name="component.package" value="glassfishv3-nucleus"/>
        <param name="package.home" value="${package.home}"/>
        <param name="repo.home" value="${basedir}/.."/>
        <param name="pkgname" value="nucleus"/>
    </antcall>

    <antcall target="build-solaris-package">	
        <param name="component.package" value="glassfishv3-nucleus"/>
        <param name="package.home" value="${package.home}"/>
        <param name="component.publish.home" 
               value="${install.tmp.dir}"/>
    </antcall>

    <antcall target="package-common">
        <param name="component.package" value="glassfishv3-nucleus"/>
        <param name="package.home" value="${package.home}"/>
        <param name="publish.package.home" value="${tools.package.home}"/>
        <param name="component.publish.home" value="${install.dir}/.."/>
    </antcall>

    <delete dir="${basedir}/build"/>
</target>

<target name="package-glassfishv3-ejb" 
        depends="publish-init,package-install-init"
        description="Package glassfishv3-ejb">

    <echo message="Creating package glassfishv3-ejb..."/>

    <!-- Resolve glassfish...zip file name not to have it hardcoded here -->
    <path id="zipfile">
        <fileset dir="${basedir}/../distributions/glassfish/target">
            <include name="glassfish-*.zip"/>
        </fileset>
    </path>
    <property name="zipname" refid="zipfile"/>

    <mkdir dir="${basedir}/build" />

    <unzip src="${zipname}"
           dest="${basedir}/build"/>

    <antcall target="create-prototype-com">
        <param name="component.package" value="glassfishv3-ejb"/>
        <param name="package.home" value="${package.home}"/>
        <param name="repo.home" value="${zipname}"/>
        <param name="pkgname" value="modules/ejb"/>
    </antcall>

    <antcall target="build-solaris-package">	
        <param name="component.package" value="glassfishv3-ejb"/>
        <param name="package.home" value="${package.home}"/>
        <param name="component.publish.home" 
               value="${install.tmp.dir}"/>
    </antcall>

    <antcall target="package-common">
        <param name="component.package" value="glassfishv3-ejb"/>
        <param name="package.home" value="${package.home}"/>
        <param name="publish.package.home" value="${tools.package.home}"/>
        <param name="component.publish.home" value="${install.dir}/.."/>
    </antcall>

    <delete dir="${basedir}/build"/>
</target>


<target name="package-glassfishv3-web" 
        depends="publish-init,package-install-init"
        description="Package glassfishv3-web">
    <echo message="Creating package glassfishv3-web..."/>

    <mkdir dir="${basedir}/build" />
    <unzip src="${basedir}/../distributions/web/target/web.zip"
           dest="${basedir}/build"/>

    <antcall target="create-prototype-com">
        <param name="component.package" value="glassfishv3-web"/>
        <param name="package.home" value="${package.home}"/>
        <param name="repo.home" value="${basedir}/.."/>
        <param name="pkgname" value="web"/>
    </antcall>

    <antcall target="build-solaris-package">	
        <param name="component.package" value="glassfishv3-web"/>
        <param name="package.home" value="${package.home}"/>
        <param name="component.publish.home" 
               value="${install.tmp.dir}"/>
    </antcall>

    <antcall target="package-common">
        <param name="component.package" value="glassfishv3-web"/>
        <param name="package.home" value="${package.home}"/>
        <param name="publish.package.home" value="${tools.package.home}"/>
        <param name="component.publish.home" value="${install.dir}/.."/>
    </antcall>

</target>

<target name="package-glassfishv3-common" 
        depends="publish-init,package-install-init"
        description="Package glassfishv3-common">
    <echo message="Creating package glassfishv3-common..."/>

    <antcall target="create-prototype-com">
        <param name="component.package" value="glassfishv3-common"/>
        <param name="package.home" value="${package.home}"/>
        <param name="repo.home" value="${basedir}/.."/>
        <param name="pkgname" value="common"/>
    </antcall>

    <antcall target="build-solaris-package">	
        <param name="component.package" value="glassfishv3-common"/>
        <param name="package.home" value="${package.home}"/>
        <param name="component.publish.home" 
               value="${install.tmp.dir}"/>
    </antcall>

    <antcall target="package-common">
        <param name="component.package" value="glassfishv3-common"/>
        <param name="package.home" value="${package.home}"/>
        <param name="publish.package.home" value="${tools.package.home}"/>
        <param name="component.publish.home" value="${install.dir}/.."/>
    </antcall>

</target>

<target name="package-javadb" 
        depends="publish-init,package-install-init"
        description="Package javadb">
    <echo message="Creating package javadb..."/>

    <unzip src="${maven.repo.local}/javadb/javadb/${javadb.version}/${javadb.name}-${javadb.version}.jar" dest="${basedir}/build"/>

    <unzip src="${basedir}/build/javadb.zip" dest="${basedir}/build"/>

    <antcall target="create-prototype-com">
        <param name="component.package" value="javadb"/>
        <param name="package.home" value="${package.home}"/>
        <param name="repo.home" value="${basedir}/build/javadb.zip"/>
        <param name="pkgname" value="javadb"/>
    </antcall>

    <antcall target="build-solaris-package">	
        <param name="component.package" value="javadb"/>
        <param name="package.home" value="${package.home}"/>
        <param name="component.publish.home" value="${basedir}/build"/>
    </antcall>

    <antcall target="package-common">
        <param name="component.package" value="javadb"/>
        <param name="package.home" value="${package.home}"/>
        <param name="publish.package.home" value="${tools.package.home}"/>
        <param name="component.publish.home" value="${install.dir}/.."/>
    </antcall>

</target>

<target name="push-to-repository" 
        depends="publish-init"
        description="Publishing packages to IPS Repository ${REPO_URL}">
    <antcall target="push-package">
        <param name="pkgname" value="glassfishv3-common"/>
        <param name="pkg.dir" value="${pkgs.home}"/>
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="push-package">
        <param name="pkgname" value="glassfishv3-web"/>
        <param name="pkg.dir" value="${pkgs.home}"/>
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="push-package">
        <param name="pkgname" value="glassfishv3-nucleus"/>
        <param name="pkg.dir" value="${pkgs.home}"/>
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="push-package">
        <param name="pkgname" value="javadb"/>
        <param name="pkg.dir" value="${pkgs.home}"/>
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
</target>

<target name="create-ips-image"  
      depends="create-installer-ips-image, create-glassfish-ips-image">
</target>

<target name="create-installer-ips-image" 
        depends="publish-init"
        description="Creating IPS Image without Domains for Installer">
    <antcall target="create-common-image"/>
    <zip destfile="${image.dir}/../V3IPSImage_Installer.zip">
            <fileset dir="${image.dir}" includes="**/*" />
    </zip>
    <delete dir="${image.dir}"/>
</target>

<target name="create-glassfish-ips-image" 
        depends="publish-init,extract-uc-bootstrap"
	description="Creating IPS Image with Domains">
    <antcall target="create-common-image"/>

    <mkdir dir="${image.dir}/glassfish/domains" />
    <copy todir="${image.dir}/glassfish/domains">
            <fileset dir="${install.dir}/domains"/>
    </copy>
    <mkdir dir="${image.dir}/bin" />
    <mkdir dir="${image.dir}/updatetool/lib" />
    <copy tofile="${image.dir}/updatetool/lib/ucbootstrap.jar"
        file="${uc.bootstrap.home}/ucbootstrap.jar"/>          
    <copy tofile="${image.dir}/bin/updatetool"
	file="${uc.bootstrap.home}/ucbootstub.sh"/>  
    <copy tofile="${image.dir}/bin/updatetool.bat"
        file="${uc.bootstrap.home}/ucbootstub.bat"/> 
    <copy tofile="${image.dir}/bin/pkg"
        file="${uc.bootstrap.home}/ucbootstub.sh"/>  
    <copy tofile="${image.dir}/bin/pkg.bat"
	    file="${uc.bootstrap.home}/ucbootstub.bat"/>
    <mkdir dir="${image.dir}/../glassfishv3-tp2"/>
    <copy todir="${image.dir}/../glassfishv3-tp2">
	    <fileset dir="${image.dir}" includes="**/*" />
    </copy>
    <chmod file="${image.dir}/../glassfishv3-tp2/bin/**" perm="ugo+rx"/>
    <chmod file="${image.dir}/../glassfishv3-tp2/glassfish/bin/**" perm="ugo+rx"/>
  
    <exec dir="${image.dir}/.." executable="zip">
          <arg line= "-r V3IPSImage_GF.zip glassfishv3-tp2"/>
    </exec>
    <delete dir="${image.dir}/../glassfishv3-tp2"/>
    <delete dir="${image.dir}"/>
</target>

<target name="create-common-image" 
        depends="publish-init"
        description="Creating IPS Image">
    <antcall target="create-local-image">
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="update-cfg-cache">
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="install-package">
        <param name="pkgname" value="glassfishv3-common"/>
    </antcall>
    <antcall target="install-package">
        <param name="pkgname" value="glassfishv3-nucleus"/>
    </antcall>
    <antcall target="install-package">
        <param name="pkgname" value="glassfishv3-web"/>
    </antcall>
    <antcall target="install-package">
        <param name="pkgname" value="javadb"/>
    </antcall>
    <mkdir dir="${image.dir}/bin"/>
    <copy todir="${image.dir}/bin"
	    file="${basedir}/misc/asadmin.bat"/>
    <copy todir="${image.dir}/bin"
	    file="${basedir}/misc/asadmin"/>


</target>

<target name="push-ejb-to-repository" 
        depends="publish-init"
        description="Publishing EJB package to IPS Repository ${REPO_URL}">
    <antcall target="push-package">
        <param name="pkgname" value="glassfishv3-ejb"/>
        <param name="pkg.dir" value="${pkgs.home}"/>
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
</target>

<target name="create-ejb-ips-image" 
        depends="publish-init"
        description="Creating IPS Image for EJB">
    <antcall target="create-local-image">
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="update-cfg-cache">
        <param name="REPO_URL" value="${REPO_URL}"/>
    </antcall>
    <antcall target="install-package">
        <param name="pkgname" value="glassfishv3-ejb"/>
    </antcall>
    <zip destfile="${image.dir}/../V3EJBIPSImage_GF.zip">
            <fileset dir="${image.dir}" includes="**/*" />
    </zip>
    <delete dir="${image.dir}"/>
</target>
 
 
Close
loading
Please Confirm
Close