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 / packager-ext / publish.xml

Size: 43434 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.
-->
<target name="publish-init">
    <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="solarisx86">
        <os name="SunOS" arch="x86"/>
    </condition>
    <condition property="darwin">
        <os name="Mac OS X"/>
    </condition>
    <condition property="linux">
        <equals arg1="${os.name}" arg2="Linux"/>
    </condition>
    <!--<condition property="checksvr4build">
        <equals arg1="${svr4.build}" arg2="true"/>
    </condition> -->
    <condition property="solarissvr4build">
        <and>
        <equals arg1="${native.build}" arg2="true"/>
        <equals arg1="${os.name}" arg2="SunOS"/>
        </and>
    </condition>
    <condition property="linuxrpmbuild">
        <and>
        <equals arg1="${native.build}" arg2="true"/>
        <equals arg1="${os.name}" arg2="Linux"/>
        </and>
    </condition>
    <!-- Adding this condition for Debian builds -->
    <condition property="linuxdebian">
        <and>
        <equals arg1="${native.build}" arg2="true"/>
        <equals arg1="${os.name}" arg2="Linux" />
        <equals arg1="${debian.package}" arg2="true" />
        </and>
    </condition>
    <condition property="native.package.home" value="${rpms.home}">
         <equals arg1="${os.name}" arg2="Linux"/>
    </condition>
    <property name="native.package.home" value="${pkgs.home}"/>


    <condition property="host.obj.dir" value="SunOSx86">
        <os name="SunOS" arch="x86"/>
    </condition>
    <available file="${javadoc.publish.home}" type="dir"
               property="javadoc.present"/>
</target>

<target name="post-bootstrap-unix" depends="publish-init,post-bootstrap-solaris,post-bootstrap-unix-pkg-jdk" if="unix">
    <!-- imq packages -->
    <antcall target="do.unzip">
        <param name="name" value="${glassfish.imq.package.name}"/>
        <param name="version" value="${glassfish.imq.package.version}"/>
        <param name="directory" value="${native.package.home}" />
    </antcall>
</target>

<target name="post-bootstrap-solaris" depends="publish-init" if="solaris" >
    <!-- javahelp packages -->
    <!--antcall target="do.unzip">
        <param name="name" value="${glassfish.javahelp.package.name}"/>
         <param name="version" value="${glassfish.javahelp.version}"/>
        <param name="directory" value="${native.package.home}"/>
    </antcall-->
</target>


<target name="post-bootstrap" depends="publish-init,post-bootstrap-common,post-bootstrap-unix"/>

<target name="post-bootstrap-common" depends="publish-init,post-bootstrap-nonmac-jdk">
    <!-- Posr bootstrap for imq -->
     <mkdir dir="${imq.publish.home}" />
    <antcall target="do.unzip">
        <param name="name" value="${glassfish.imq.name}"/>
        <param name="version" value="${glassfish.imq.version}"/>
        <param name="directory" value="${imq.publish.home}"/>
    </antcall>

     <!-- Post bootstrap for javadocs -->
     <mkdir dir="${s1as-javadocs.publish.home}" />
     <antcall target="do.unzip">
        <param name="name" value="${glassfish.s1as.name}"/>
        <param name="version" value="${glassfish.s1as.version}"/>
        <param name="directory" value="${s1as-javadocs.publish.home}"/>
     </antcall>
     <antcall target="publish-s1as-javadocs" />

    <!-- Post bootstrap for SUNWasdem -->
    <mkdir dir="${asdem.tmp.dir}" />
    <antcall target="do.unzip">
        <param name="name" value="${glassfish.samples.name}"/>
        <param name="version" value="${glassfish.samples.version}"/>
        <param name="directory" value="${asdem.tmp.dir}"/>
    </antcall>

    <!-- Post bootstrap for jarpack -->
    <mkdir dir="${jarpack.publish.home}"/>
    <antcall target="do.unzip">
        <param name="name" value="${glassfish.jarpack.name}"/>
        <param name="version" value="${glassfish.jarpack.version}"/>
        <param name="directory" value="${jarpack.publish.home}"/>
    </antcall>
    <!--

    <unzip src="${asdem.tmp.dir}/SUNWasdem.zip"
           dest="${asdem.tmp.dir}/appserver"/>
    -->

    <antcall target="do.unzip">
        <param name="name" value="${glassfish.samples.name}"/>
        <param name="version" value="${glassfish.samples.version}"/>
        <param name="directory" value="${glassfish.samples.home}"/>
    </antcall>

    <unzip src="${asdem.tmp.dir}/samples.zip"
           dest="${publish.home}/samples" />

    <echo message="Setting up Samples... SAMPLES: Explode samples.zip to ${glassfish.samples.home}"/>
        <unzip src="${glassfish.samples.home}/samples.zip"
               dest="${glassfish.samples.home}"/>
        <echo message="Copy samples.jar to ${glassfish.applications.home}"/>
        <copy todir="${glassfish.applications.home}"
              file="${glassfish.samples.home}/predeployed/pe80/samples.jar"/>
        <copy tofile="${glassfish.templates.home}/samples/common.properties.template"
              file="${glassfish.samples.home}/common.properties"/>
        <copy todir="${glassfish.templates.home}/samples"
              file="${glassfish.samples.home}/docs/pe-list.html"/>
        <delete file="${glassfish.samples.home}/samples.zip"/>
</target>

<target name="do.unzip">
    <echo message="${repository} Unzipping ${name}-${version}.jar to ${directory}"/>
    <unzip src="${repository}/${name}/jars/${name}-${version}.jar"
           dest="${directory}"/>
</target>

<target name="package-install-init" if="unix">     
    
    <exec  executable="rm" failonerror="false">
    <arg line="-rf ${install.tmp.dir}"/>
    </exec>
    <mkdir dir="${install.tmp.dir}"/>
    <echo message="the install tmp dir:${install.tmp.dir}" />
    <exec dir="${install.tmp.dir}" executable="ln">
    <arg line="-s ${install.dir} ./appserver"/>
    </exec>
</target>


<!-- preinit checks if the samples have been exploded. The check depends on mere existence of directory.  -->
<target name="preinit">
    <available type="dir" file="${samples.publish.home}" property="samples.bs.complete"/>
</target>
<!-- complete-samples-bootstrap completes the bootstrapping procedure for samples -->
<target name="complete-samples-bootstrap" unless="samples.bs.complete">
    <!-- For samples-binary, explode it to samples.publish.home -->
    <!-- 
        This is done in the init step because there are some targets,
        (e.g. predeployed-samples) other than publish-samples, 
        package-SUNWasdem that depend on availability of samples component.
        An optimization is to be done such that the expansion of samples.zip
        occurs if and only if the ${samples.publish.home} does not exist.
    -->
    <mkdir  dir="${samples.publish.home}"/>
    <unzip src="${samples.bs.home}/samples.zip" dest="${samples.publish.home}"/>
    <echo message="SAMPLES: Exploded bootstrapped ${samples.bs.home}/samples.zip to ${samples.publish.home}"/>
</target>
<!-- publish saaj -->
<target name="publish-saaj" depends="publish-init">

    <!-- Copy to the tmp dir instead of the saaj.publish.home to work around
       - the senario when both saaj is bootstrapped with binary only -->

    <mkdir dir="${saaj.tmp.dir}"/>
    <mkdir dir="${saaj.tmp.lib.dir}"/>

    <copy file="${saaj-api.jar}" 
          todir="${saaj.tmp.lib.dir}" overwrite="true"/>
    
    <copy file="${saaj-impl.jar}"
          todir="${saaj.tmp.lib.dir}" overwrite="true"/>
 
   <!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="saaj-api.jar"/>
        <param name="pack.jar.dir" value="${saaj.tmp.lib.dir}"/>
    </antcall>     
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="saaj-impl.jar"/>
        <param name="pack.jar.dir" value="${saaj.tmp.lib.dir}"/>
    </antcall>
    -->    
</target>

<!-- publish jaxr -->
<target name="publish-jaxr" depends="publish-init">

    <!-- Copy to the tmp dir instead of the jaxr.publish.home to work around
       - the senario when both jaxr is bootstrapped with binary only -->

    <mkdir dir="${jaxr.tmp.dir}"/>
    <mkdir dir="${jaxr.tmp.lib.dir}"/>

    <copy file="${jaxr-api.jar}"
          todir="${jaxr.tmp.lib.dir}" overwrite="true"/>
    <copy file="${jaxr-impl.jar}"
          todir="${jaxr.tmp.lib.dir}" overwrite="true"/>

    <jar jarfile="${jaxr-impl.modified.jar}" duplicate="fail">
        <zipfileset src="${jaxr-impl.jar}" excludes="META-INF/**"/>
        <zipfileset src="${jaxb-api.jar}" excludes="META-INF/**"/>
        <zipfileset src="${jaxb-libs.jar}" excludes="META-INF/**"/>
        <zipfileset src="${jaxb-impl.jar}" excludes="META-INF/**"/>
        <zipfileset src="${namespace.jar}" excludes="META-INF/**"/>
    </jar>
    <copy file="${jaxr-impl.modified.jar}"
	tofile="${jaxr.tmp.lib.dir}/jaxr-impl.jar" overwrite="true"/>

    <!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jaxr-api.jar"/>
        <param name="pack.jar.dir" value="${jaxr.tmp.lib.dir}"/>
    </antcall>
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jaxr-impl.jar"/>
        <param name="pack.jar.dir" value="${jaxr.tmp.lib.dir}"/>
    </antcall>  
    --> 
</target>

<!-- publish jaxrpc -->
<target name="publish-jaxrpc-init" depends="publish-init">

    <!-- Copy to the tmp dir instead of the jaxrpc.publish.home to work around
       - the senario when both jaxrpc is bootstrapped with binary only -->

    <mkdir dir="${jaxrpc.tmp.dir}"/>
    <mkdir dir="${jaxrpc.tmp.lib.dir}"/>
    <mkdir dir="${jaxrpc.tmp.templates.dir}"/>

    <copy file="${jaxrpc-api.jar}"
          todir="${jaxrpc.tmp.lib.dir}" overwrite="true"/>
    <copy file="${jax-qname.jar}"
          todir="${jaxrpc.tmp.lib.dir}" overwrite="true"/>
    <copy file="${jaxrpc-impl.modified.jar}"
          tofile="${jaxrpc.tmp.lib.dir}/jaxrpc-impl.jar" overwrite="true"/>
    <jar jarfile="${jaxrpc.tmp.lib.dir}/xsdlib.jar">
        <zipfileset src="${xsdlib.jar}"
            excludes="META-INF/*.DSA META-INF/*.SF"/>
    </jar>
    <jar jarfile="${jaxrpc.tmp.lib.dir}/relaxngDatatype.jar">
        <zipfileset src="${relaxngDatatype.jar}"
            excludes="META-INF/*.DSA META-INF/*.SF"/>
    </jar>

   <!-- 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jaxrpc-api.jar"/>
        <param name="pack.jar.dir" value="${jaxrpc.tmp.lib.dir}"/>
    </antcall>   
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jax-qname.jar"/>
        <param name="pack.jar.dir" value="${jaxrpc.tmp.lib.dir}"/>
    </antcall> 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jaxrpc-impl.jar"/>
        <param name="pack.jar.dir" value="${jaxrpc.tmp.lib.dir}"/>
    </antcall> 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="xsdlib.jar"/>
        <param name="pack.jar.dir" value="${jaxrpc.tmp.lib.dir}"/>
    </antcall> 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="relaxngDatatype.jar"/>
        <param name="pack.jar.dir" value="${jaxrpc.tmp.lib.dir}"/>
    </antcall> 
    --> 
</target>

<target name="publish-jaxrpc-windows" if="windows" 
        depends="publish-jaxrpc-init">
    <echo message="Publishing template files for webservices..."/>
    <copy todir="${jaxrpc.tmp.templates.dir}">
        <fileset dir="${appserv-core.publish.home}/lib/install/templates"
                 includes="**/*.bat.template"/>
    </copy>
</target>

<target name="publish-jaxrpc-unix" if="unix" 
        depends="publish-jaxrpc-init">
    <!-- wscompile/wsdeploy files -->
    <echo message="Publishing template files for webservices..."/>
    <copy todir="${jaxrpc.tmp.templates.dir}">
        <fileset dir="${appserv-core.publish.home}/lib/install/templates"
                 includes="**/*.template"
                 excludes="**/*.bat.template"/>
    </copy>
</target>

<target name="publish-jaxrpc" 
        depends="assemble-jaxrpc, publish-jaxrpc-unix, publish-jaxrpc-windows">
</target>

<!-- publish icu -->
<target name="publish-icu" depends="publish-init"/>

<!-- publish SUNWaspx -->
<target name="publish-aspx" depends="publish-init"/>
<!--publishing mail -->
<target name="publish-mail" depends="publish-init">
    <mkdir dir="${mail.tmp.dir}"/>
    <mkdir dir="${mail.tmp.lib.dir}"/>

    <copy file="${mail.jar}"
          todir="${mail.tmp.lib.dir}" overwrite="true"/>

   <!-- 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="mail.jar"/>
        <param name="pack.jar.dir" value="${mail.tmp.lib.dir}"/>
    </antcall>      
    --> 
</target>

<target name="publish-activation" depends="publish-init">
    <mkdir dir="${activation.tmp.dir}"/>
    <mkdir dir="${activation.tmp.lib.dir}"/>

    <copy file="${activation.jar}"
          todir="${activation.tmp.lib.dir}" overwrite="true"/>
   <!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="activation.jar"/>
        <param name="pack.jar.dir" value="${activation.tmp.lib.dir}"/>
    </antcall>        
   --> 
</target>

<target name="publish-admin-templates-windows" if="windows" 
    depends="publish-init">
    <echo message="Publishing template files for admin..."/>
</target>

<target name="publish-admin-templates-unix" if="unix"
    depends="publish-init">
    <echo message="Publishing template files for admin..."/>
</target>

<target name="publish-admin" depends="publish-init, publish-admin-templates-windows, publish-admin-templates-unix">
    <echo message="Publishing admin-cli.jar"/>
    <copy todir="${tools.publish.home}/lib">
        <fileset dir="${admin-cli.publish.home}/lib"
            includes="admin-cli.jar"/>
    </copy>
<!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="appserv-admin.jar"/>
        <param name="pack.jar.dir" value="${tools.publish.home}/lib"/>
    </antcall>    
  -->
</target>

<!-- publish SUNWpr (check whether Windows version also work) -->
<target name="publish-pr" depends="publish-init"/>

<!-- publish SUNWtls -->
<target name="publish-tls" depends="publish-tls-windows, publish-tls-unix"/>
<target name="publish-tls-unix" depends="publish-init" if="unix"/>
<target name="publish-tls-windows" depends="publish-init" if="windows">
    <mkdir dir="${clientlibs.publish.home}/bin"/>
    <copy todir="${clientlibs.publish.home}/bin">
        <fileset dir="${clientlibs.publish.home}/lib"
                 includes="**.dll"/>
    </copy>
</target>

<target name="publish-commons-logging-init" depends="publish-init"> 
    <mkdir dir="${commons-logging.tmp.dir}"/>
    <mkdir dir="${commons-logging.tmp.lib.dir}"/>
</target>

<!-- publish commons-logging -->
<target name="publish-commons-logging" depends="publish-commons-logging-init"
        description="Publish the commons-logging Jar">
    <echo message="Publishing commons-logging jar..."/>

    <!-- explicitly rename commons-logging-api.jar to commons-logging.jar -->
    <copy file="${commons-logging-api.jar}"
        tofile="${commons-logging.tmp.lib.dir}/com-sun-commons-logging.jar"/>

    <!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="com-sun-commons-logging.jar"/>
        <param name="pack.jar.dir" value="${commons-logging.tmp.lib.dir}"/>
    </antcall>  
    --> 
</target>

<!-- publish jhall -->
<target name="publish-jhall-init" depends="publish-init"> 
    <mkdir dir="${jhall.tmp.dir}"/>
    <mkdir dir="${jhall.tmp.lib.dir}"/>
</target>

<target name="publish-jhall" depends="publish-jhall-init"
        description="Publish the JHALL Jar">
    <echo message="Publishing JHALL jar..."/>
    <copy file="${jhall.jar}" 
          tofile="${jhall.tmp.lib.dir}/jhall.jar" overwrite="true"/>
</target>

<target name="publish-peorb-init" depends="publish-init" if="darwin"> 
    <mkdir dir="${peorb.tmp.dir}"/>
    <mkdir dir="${peorb.tmp.lib.dir}"/>
    <mkdir dir="${peorb.tmp.lib.endorsed.dir}"/>
</target>

<target name="publish-peorb" depends="publish-init, publish-peorb-darwin" if="darwin"
        description="Publish the PEORB Jars">
    <echo message="Publishing PEORB jars..."/>

    <!-- 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="peorb.jar"/>
        <param name="pack.jar.dir" value="${peorb.tmp.lib.endorsed.dir}"/>
    </antcall> 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="omgapi.jar"/>
        <param name="pack.jar.dir" value="${peorb.tmp.lib.endorsed.dir}"/>
    </antcall>      
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="optorbcomp.jar"/>
        <param name="pack.jar.dir" value="${peorb.tmp.lib.endorsed.dir}"/>
    </antcall>         
    -->
</target>

<target name="publish-peorb-darwin" depends="publish-init, publish-peorb-init" if="darwin">
    <copy file="${peorb.jar}"
        todir="${peorb.tmp.lib.endorsed.dir}" overwrite="true"/>
    <copy file="${omgapi.jar}"
        todir="${peorb.tmp.lib.endorsed.dir}" overwrite="true"/>
    <copy file="${optorbcomp.jar}"
        todir="${peorb.tmp.lib.endorsed.dir}" overwrite="true"/>       
</target>

<!-- QQ. delay the assembly of the server core appserv-rt.jar until
   - the publishing phase.
 -->
<!-- publish SUNWascmo, server core -->
<target name="publish-rt" depends="publish-init, assemble-server"/>
<target name="publish-exts" depends="publish-init, assemble-server-exts"/>
<target name="publish-j2eeapi" depends="publish-init, assemble-j2eeapi"/>
<!-- SUNWascmn [asenv.template] -->
<target name="publish-asenv-template-windows" depends="publish-init" if="windows">

    <copy todir="${component.publish.home}/lib/install/templates">
        <fileset dir="${basedir}/internal/install"
                 includes="asenv.bat.template"/>
    </copy>

</target>

<target name="publish-asenv-template-unix" depends="publish-init" if="unix">

    <copy todir="${component.publish.home}/lib/install/templates">
        <fileset dir="${basedir}/internal/install"
                 includes="asenv.conf.template"/>
    </copy>
</target>

<target name="publish-asenv-templates" 
        depends="publish-asenv-template-windows, publish-asenv-template-unix"/>
<target name="publish-server"
	depends="publish-rt, publish-exts, publish-j2eeapi, publish-asenv-templates"/>

<!-- publish SUNWaso, product core -->
<target name="publish-aso-init" depends="publish-init">
</target>

<!-- SUNWaso [include] -->
<target name="publish-aso-include" depends="publish-aso-init"/>

<!-- SUNWaso [bin] -->
<target name="publish-aso-bin-windows" 
	depends="publish-aso-init" if="windows">
</target>

<target name="publish-aso-bin-unix" 
	depends="publish-aso-init" if="unix"/>

<target name="publish-aso-bin" 
	depends="publish-aso-bin-windows, publish-aso-bin-unix"/>

<!-- SUNWaso [docs] -->
<target name="publish-aso-docs" depends="publish-aso-init">
    <copy todir="${aso.tmp.dir}">
        <fileset dir="${appserv-docs.publish.home}"
                 includes="docs/**"/>
    </copy>
</target>

<!-- SUNWaso [samples] -->
<target name="publish-aso-samples" depends="publish-aso-init">
    <copy todir="${aso.tmp.samples.dir}">
        <fileset dir="${samples.publish.home}"
                 includes="index.html, common.properties, common-ant.xml, quickstart/**"/>
    </copy>
</target>

<!-- SUNWaso [lib/install/templates] -->
<target name="publish-aso-templates-windows" 
        depends="publish-aso-init" if="windows">

   <!-- tools files -->
    <echo message="Publishing tool files admin/jspc..."/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${tools.publish.home}/lib/install/templates"
                 includes="**/*.bat.template"/>
    </copy>

    <echo message="Publishing verifier files"/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${avk.publish.home}/verifier/bin"
                 includes="**/*.bat.template"/>
    </copy>

   <!-- assembly-tool files -->
    <echo message="Publishing assembly-tool files ..."/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${assembly-tool.publish.home}/lib/install/templates"
                 includes="**/*.bat.template"/>
    </copy>

   <!-- Appclient container files -->
    <echo message="Publishing Windows Specific appcontainer template files..."/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${basedir}/internal/install"
                 includes="appclient.bat.template"/>
    </copy>

    <!-- icon files -->
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${basedir}/internal/install/icons"
                 includes="**"/>
    </copy>

    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${basedir}/internal/install"
                 includes="asant.bat.template package-appclient.bat.template"/>
    </copy>
</target>

<target name="publish-aso-templates-unix" 
        depends="publish-aso-init" if="unix">

   <!-- tools files -->
    <echo message="Publishing tool files admin/jspc..."/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${tools.publish.home}/lib/install/templates"
                 includes="**/*.template"
                 excludes="**/*.bat.template"/>
    </copy>

    <echo message="Publishing verifier files"/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${avk.publish.home}/verifier/bin"
                 includes="**/*.template"
                 excludes="**/*.bat.template"/>
    </copy>

    <!-- assembly-tool files -->
    <echo message="Publishing assmbly-tool files ..."/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${assembly-tool.publish.home}/lib/install/templates"
                 includes="**/*.template"
                 excludes="**/*.bat.template"/>
    </copy>

   <!-- Appclient container files -->
    <echo message="Publishing Windows Specific appcontainer template files..."/>
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${basedir}/internal/install"
                 includes="appclient.template"/>
    </copy>

    <!-- Verifier -->
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${basedir}/internal/install"
                 includes="asant.template,package-appclient.template"/>
    </copy>

    <!-- Uninstaller -->
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${basedir}/internal/install"
                 includes="uninstall.template"/>
    </copy>
</target>

<target name="publish-aso-templates" 
        depends="publish-aso-templates-windows, publish-aso-templates-unix">

    <echo message="Publishing the admin templates"/>
    <!-- Including temporary domain2server.xsl -->
    <!-- NOTE. The ri-domain.xml.template is excluded here to avoid
       - error.  We have to distinguish the two as RI does not ship
       - adminGUI as PE does.  -->
    <copy todir="${aso.tmp.templates.dir}">
        <fileset dir="${admin.templates.publish.home}"
                 excludes="README,CVS,client.policy,appclientlogin.conf,
                           ri-domain.xml.template,cacerts-ri.jks"/>
    </copy>

    <echo message="Publishing the domain-dtd"/>
    <copy todir="${aso.tmp.lib.dir}/dtds">
        <fileset dir="${domain.dtd.publish.home}"
                 includes="*.dtd"/>
    </copy>

    <echo message="Copying index.html from docs as template index.html"/>
    <copy file="${appserv-docs.publish.home}/docs/index.html"
            tofile="${aso.tmp.templates.dir}/index.html"
            overwrite="true"/>
</target>

<target name="publish-aso-jars" 
        depends="assemble-jstl, publish-aso-init, publish-aso-apps">

    <!-- j2ee-svc.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${j2ee-svc.jar}"/>

    <!-- appserv-cmp.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${appserv-cmp.jar}"/>

    <!-- appserv-jstl.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${appserv-jstl.jar}"/>

    <!-- appserv-tags.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${appserv-tags.jar}"/>

    <!-- sun-appserv-ant.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${sun-appserv-ant.jar}"/>

    <!-- sun-as-jsr88-dm.jar -->
    <copy todir="${aso.tmp.lib.dir}/deployment" file="${sun-as-jsr88-dm.jar}"/>

    <!-- appserv-assemblytool.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${appserv-assemblytool.jar}"/>

    <!-- deployhelp.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${deployhelp.jar}"/>

    <!-- commons-launcher.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${commons-launcher.jar}"/>

    <!-- expand out LauncherBootstrap.class (used by windows icons) -->
    <unzip src="${commons-launcher.jar}" dest="${aso.tmp.lib.dir}">
        <patternset>
            <include name="LauncherBootstrap.class"/>
        </patternset>
    </unzip>
    
    <!-- appserv-upgrade.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${appserv-upgrade.jar}"/>

    <!-- jsf-api.jar 
    <copy todir="${aso.tmp.lib.dir}" file="${jsf-api.jar}"/> -->

    <!-- jsf-impl.jar -->
    <copy todir="${aso.tmp.lib.dir}" file="${jsf-impl.jar}"/>
    <!-- JSR 160 RI has to be packaged as is -->
    <echo message="Copying the ${jmxremote_optional.jar} before packaging"/>
    <!-- This is needed always, as it is not part of J2SE 1.5.0 -->
    <copy todir="${aso.tmp.lib.dir}" file="${jmxremote_optional.jar}"/>
    <!-- JSR 160 RI has to be packaged as is -->

    <!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="j2ee-svc.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>  
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="appserv-cmp.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>  
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="appserv-jstl.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>  
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="appserv-tags.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall> 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="sun-appserv-ant.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall> 
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="sun-as-jsr88-dm.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}/deployment"/>
    </antcall>
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="appserv-assemblytool.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="com-sun-commons-launcher.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="deployhelp.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jsf-api.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>  
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jsf-impl.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall> --> 
    <!-- jarpack seems to modify the MANIFEST ot the jars, not using at the moment -->
    <!--
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jmxremote.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>  
    <antcall target="jar-pack">
        <param name="pack.jar.name" value="jmxremote_optional.jar"/>
        <param name="pack.jar.dir" value="${aso.tmp.lib.dir}"/>
    </antcall>  
    -->
    <!-- jarpack seems to modify the MANIFEST ot the jars, not using at the moment -->
</target>

<!-- SUNWaso [lib] -->
<target name="publish-aso-lib" 
        depends="publish-aso-init, publish-aso-templates, publish-aso-jars">

    <!-- *.dtd files -->
    <copy todir="${aso.tmp.lib.dir}/dtds">
        <fileset dir="${appserv-commons.publish.home}/lib/dtds"/>
    </copy>

    <!-- *.schema files -->
    <copy todir="${aso.tmp.lib.dir}/schemas">
        <fileset dir="${appserv-commons.publish.home}/lib/schemas"/>
    </copy>

    <!-- *.pl files -->
    <copy todir="${aso.tmp.lib.dir}">
        <fileset dir="${tools.publish.home}/lib" includes="**.pl"/>
    </copy>

    <!-- *.xml files -->
    <copy todir="${aso.tmp.lib.dir}">
        <fileset dir="${appserv-core.publish.home}/lib"/>
    </copy>

    <!-- lib/verifier files -->
    <copy todir="${aso.tmp.lib.dir}/verifier">
        <fileset dir="${avk.publish.home}/verifier/config/verifier"/>
    </copy>

    <copy todir="${aso.tmp.lib.dir}/appclient" overwrite="true">
        <fileset dir="${admin.templates.publish.home}"
                 includes="client.policy, appclientlogin.conf"/>
    </copy>

    <!-- copy wss-client-config.xml from jaxrpc-sec -->
    <copy todir="${aso.tmp.lib.dir}/appclient" overwrite="true">
        <fileset dir="${jaxrpc-sec.publish.home}/as81-config"
                 includes="wss-client-config.xml"/>
    </copy>

    <!-- copy wss-server-config.xml from jaxrpc-sec -->
    <copy todir="${aso.tmp.lib.dir}/install/templates" overwrite="true">
        <fileset dir="${jaxrpc-sec.publish.home}/as81-config"
                 includes="wss-server-config.xml"/>
    </copy>

    <!-- lib/install/databases files -->
    <copy todir="${aso.tmp.lib.dir}/install/databases" overwrite="true">
        <fileset dir="${appserv-core.publish.home}/lib"
                 includes="ejbtimer.dbn, ejbtimer$1.wal"/>
        <fileset dir="${appserv-core.publish.home}/lib"
                 includes="*.sql"/>
    </copy>

    <!-- Copying launcher.xml and launcher.properties -->
    <copy todir="${aso.tmp.lib.dir}" >
        <fileset dir="${appserv-core.publish.home}/lib"
                 includes="launcher.xml,launcher.properties"/>
    </copy>

    <!-- Copying processlauncher.xml, processlauncher.properties for windows menu items bootstrap -->
    <copy todir="${aso.tmp.lib.dir}" overwrite="true">
        <fileset dir="${tools.publish.home}/lib"
                 includes="processLauncher.xml,processLauncher.properties,PLBootstrap.class"/>
    </copy>
    
    <!-- copy package-appclient.xml -->
    <copy todir="${aso.tmp.lib.dir}">
        <fileset dir="${basedir}/internal/install"
                 includes="package-appclient.xml"/>
    </copy>
</target>

<!-- This target publishs all the system applications shipped with
   - the SUNWaso package.  -->
<target name="publish-aso-apps" 
        depends="publish-aso-adminapp, publish-aso-jdbcra, publish-aso-genericra,
                 publish-aso-jaxr-ra, publish-aso-jmsra, publish-aso-mejb,
                 publish-aso-ejbtimer, publish-aso-predeployed-samples"/>
                 
<target name="publish-aso-mejb" depends="publish-aso-init">
    <echo message="Publishing MEJB application"/>
    <copy file="${admin-core.publish.home}/jsr77/lib/MEjbApp.ear"
          todir="${aso.tmp.applications.dir}"/>
</target>

<target name="publish-aso-predeployed-samples" depends="publish-aso-init" unless="ri.build">
    <echo message="Publishing Predeployed samples"/>
    <copy file="${samples.publish.home}/predeployed/pe80/samples.jar"
          todir="${aso.tmp.applications.dir}"/>
</target>

<target name="publish-aso-ejbtimer" depends="publish-aso-init">
    <echo message="Publishing EJB Timer system app"/>
    <copy file="${appserv-core.publish.home}/lib/__ejb_container_timer_app.ear"
          todir="${aso.tmp.applications.dir}"/>
</target>

<target name="publish-aso-jdbcra" depends="publish-aso-init">

    <!-- Explode the jdbc rars to applications directory -->
    <echo message="Exploding __ds.rar  __xa.rar and __cp.rar"/>
    <unjar src="${jdbcra.publish.home}/lib/__ds.rar" 
           dest="${aso.tmp.applications.dir}/__ds"/>
    <unjar src="${jdbcra.publish.home}/lib/__xa.rar" 
           dest="${aso.tmp.applications.dir}/__xa"/>
    <unjar src="${jdbcra.publish.home}/lib/__cp.rar" 
           dest="${aso.tmp.applications.dir}/__cp"/>
</target>

<target name="publish-aso-jaxr-ra" depends="publish-aso-init">

    <!-- Explode the jaxr rar to applications directory -->
    <echo message="Publishing JAXR Resource Adapter"/>

    <echo message="Exploding jaxr-ra.rar"/>
    <unjar src="${jaxr-ra.publish.home}/lib/jaxr-ra.rar" 
           dest="${aso.tmp.applications.dir}/jaxr-ra"/>
</target>


<target name="publish-aso-jmsra" depends="publish-jmsra, publish-jmsra-ri"/>

<target name="publish-jmsra" depends="publish-aso-init" unless="ri.build">

    <!-- Explode the imqjms rars to applications directory -->
    <echo message="Publishing S1MQ Resource Adapter"/>

    <echo message="Exploding imqjmsra.rar"/>
    <unjar src="${imq.publish.home}/imq/lib/imqjmsra.rar" 
           dest="${aso.tmp.applications.dir}/jmsra/"/>

</target>

<target name="publish-aso-genericra" depends="publish-aso-init" unless="ri.build">

    <!-- Copy generic ra for jms to applications directory -->
    <echo message="Publishing Generic Resource Adapter"/>

    <echo message="Copying generic jms resource adapter"/>
    <copy todir="${aso.tmp.lib.dir}/addons/resourceadapters/genericjmsra">
        <fileset dir="${genericra.publish.home}/" includes="genericra.jar, genericra.rar"/>
    </copy>

</target>


<target name="publish-aso-security-solaris" depends="publish-init" if="solaris">
    <echo message="Copying Solaris security shared libraries"/>
    <copy todir="${aso.tmp.lib.dir}" overwrite="true"
             file="${appserv-native.publish.home}/libsolarisauth.so"/>
    <echo message="Done.."/>
</target>

<target name="publish-aso-syslog-solaris" depends="publish-init" if="solaris">
    <echo message="Copying Solaris Syslog shared libraries"/>
    <copy todir="${aso.tmp.lib.dir}" overwrite="true"
             file="${appserv-native.publish.home}/libutilforsyslog.so"/>
    <echo message="Done.."/>
</target>

<target name="publish-aso-syslog-linux" depends="publish-init" if="linux">
    <echo message="Copying Linux Syslog shared libraries"/>
    <copy todir="${aso.tmp.lib.dir}" overwrite="true"
            file="${appserv-native.publish.home}/libutilforsyslog.so"/>
    <echo message="Done.."/>
</target>

<target name="publish-aso-adminapp" depends="publish-aso-init">

    <!-- Explode the admin jars to applications directory -->
    <echo message="Publishing admin app"/>
    <echo message="Exploding adminapp.ear"/>

    <copy todir="${aso.tmp.lib.dir}" overwrite="true"
          file="${appserv-core.publish.home}/lib/adminapp.ear"/>

    <unjar src="${aso.tmp.lib.dir}/adminapp.ear" 
           dest="${aso.tmp.applications.dir}/adminapp"/>
    <unjar src="${aso.tmp.applications.dir}/adminapp/adminapp.war"
           dest="${aso.tmp.applications.dir}/adminapp/adminapp_war"/>

</target>

<!-- NOTE.  Please make sure that content published using publish-aso
   - target are common to both PE and RI.
   - Content specific to PE is handled by package.xml calling 
   - additional targets.
   - Content specific to RI is handled by publish-ri.xml
-->
<target name="publish-aso" 
	depends="publish-aso-include,publish-aso-lib,
		publish-aso-docs, publish-aso-bin">

    <!-- patch directory used for linux, win2k only -->
    <copy todir="${aso.tmp.dir}/config">
        <fileset dir="${tools.publish.home}/config" includes="pkginfo"/>
    </copy>
</target>


<target name="publish-samples" depends="publish-init">
</target>

<target name="publish-asro-unix" depends="publish-init" if="unix">

    <copy todir="${asro.tmp.templates.dir}" overwrite="true"
          file="${basedir}/internal/install/asenv.conf.template"/>
</target>

<target name="publish-asro-windows" depends="publish-init" if="windows">

    <copy todir="${asro.tmp.templates.dir}" overwrite="true"
          file="${basedir}/internal/install/asenv.bat.template"/>

</target>

<!-- publish SUNWasro : the licenses and copyright -->
<target name="publish-asro" depends="publish-asro-unix, publish-asro-windows">
</target>

<!-- publish jdk -->
<target name="publish-jdk" depends="publish-init" unless="darwin">
    <!-- copy jre -->
    <copy todir="${installer.packages.dir}/jre">
        <fileset dir="${jdk.publish.home}/jre"/>
    </copy> 
</target>

<!-- publish javadocs -->
<target name="publish-s1as-javadocs" depends="publish-init" unless="javadoc.present">

    <!-- s1as-javadocs comes in a .zip format.  Need to unzip before packaging -->
    <echo message="Javadocs directory not present, using the staged javadoc"/>
    <mkdir dir="${javadoc.publish.home}/appserver"/>
    <unzip src="${s1as-javadocs.publish.home}/s1as-javadocs.zip" 
           dest="${javadoc.publish.home}/appserver">
    </unzip>
    
</target>

<target name="publish-asut-unix" if="unix" depends="publish-asut-init">
   <!-- upgrade files -->

    <copy todir="${asut.tmp.templates.dir}">
        <fileset dir="${tools.publish.home}/lib/install/templates"
                 includes="asupgrade.template, certutil.sh.template, pk12util.sh.template"
                 excludes="asupgrade.bat.template, certutil.bat.template, pk12util.bat.template"/>
    </copy>
    <copy todir="${asut.tmp.lib.dir}">
        <fileset dir="${host.publish.home}/NSsecurity/bin"
                 includes="certutil, pk12util"/>
    </copy>
    <chmod file="${asut.tmp.lib.dir}/certutil" perm="ugo+x"/>
    <chmod file="${asut.tmp.lib.dir}/pk12util" perm="ugo+x"/>

    <copy todir="${asut.tmp.lib.dir}/upgrade">
        <fileset dir="${nss-util.publish.home}"
                 includes="certutil, pk12util"/>
    </copy>
    <chmod file="${asut.tmp.lib.dir}/upgrade/certutil" perm="ugo+x"/>
    <chmod file="${asut.tmp.lib.dir}/upgrade/pk12util" perm="ugo+x"/>
</target>
<target name="publish-asut-darwin" if="darwin" depends="publish-asut-init">
   <!-- upgrade files -->

    <copy todir="${asut.tmp.templates.dir}">
        <fileset dir="${tools.publish.home}/lib/install/templates"
                 includes="asupgrade.template, certutil.sh.template, pk12util.sh.template"
                 excludes="asupgrade.bat.template, certutil.bat.template, pk12util.bat.template"/>
    </copy>
    <copy todir="${asut.tmp.lib.dir}">
        <fileset dir="${host.publish.home}/NSsecurity/bin"
                 includes="certutil, pk12util"/>
    </copy>
    <chmod file="${asut.tmp.lib.dir}/certutil" perm="ugo+x"/>
    <chmod file="${asut.tmp.lib.dir}/pk12util" perm="ugo+x"/>

    <copy todir="${asut.tmp.lib.dir}/upgrade">
        <fileset dir="${nss-util.publish.home}"
                 includes="certutil, pk12util"/>
    </copy>
    <chmod file="${asut.tmp.lib.dir}/upgrade/certutil" perm="ugo+x"/>
    <chmod file="${asut.tmp.lib.dir}/upgrade/pk12util" perm="ugo+x"/>
</target>
<target name="publish-asut-windows" if="windows" depends="publish-asut-init">
   <!-- upgrade files -->
    <echo message="Publishing upgrade files ..."/>
    <copy todir="${asut.tmp.templates.dir}">
        <fileset dir="${tools.publish.home}/lib/install/templates"
                 includes="asupgrade.bat.template, certutil.bat.template, pk12util.bat.template"/>
    </copy>
    <copy todir="${asut.tmp.lib.dir}">
        <fileset dir="${host.publish.home}/NSsecurity/bin"
                 includes="certutil.exe, pk12util.exe"/>
    </copy>
    <chmod file="${asut.tmp.lib.dir}/certutil.exe" perm="ugo+x"/>
    <chmod file="${asut.tmp.lib.dir}/pk12util.exe" perm="ugo+x"/>

    <copy todir="${asut.tmp.lib.dir}/upgrade">
        <fileset dir="${nss-util.publish.home}"
                 includes="certutil.exe, pk12util.exe"/>
    </copy>
    <chmod file="${asut.tmp.lib.dir}/upgrade/certutil.exe" perm="ugo+x"/>
    <chmod file="${asut.tmp.lib.dir}/upgrade/pk12util.exe" perm="ugo+x"/>
</target>
<target name="publish-asut-init" depends="publish-init">
    <mkdir dir="${asut.tmp.dir}"/>
    <mkdir dir="${asut.tmp.lib.dir}"/>
    <mkdir dir="${asut.tmp.templates.dir}"/>
    <copy file="${appserv-upgrade.jar}" 
          todir="${asut.tmp.lib.dir}" overwrite="true"/>
</target>

<target name="publish-asut" depends="publish-asut-unix,publish-asut-windows,publish-asut-darwin"/>

<target name="publish-install-SUNWasjdoc" if="unix" >
    <!-- <exec executable="ln" dir="${s1as-javadocs.publish.home}">
        <arg line="-s . ./appserver"/>
    </exec>
    -->
    <exec executable="${package.home}/SUNWasjdoc/createPrototype" dir="../packager-ext" resolveexecutable="true">
        <arg line="${javadoc.publish.home}/appserver  ${package.home}/SUNWasjdoc/prototype_com"/>
    </exec>
</target>
<target name="publish-init-asman" if="unix"  depends="publish-init">
    <mkdir dir="${asman.tmp.dir}"/>
    <mkdir dir="${asman.tmp.dir}/share"/>
    <mkdir dir="${asman.tmp.dir}/share/man"/>
    <mkdir dir="${asman.tmp.dir}/share/man/sman1as"/>
    <exec executable="${basedir}/internal/tools/make_man_files">
    <arg line="${appserv-docs.publish.home}/sman/ ${asman.tmp.dir}/share/man/sman1as"/>
    </exec>
    <echo message="Creating prototype_com for SUNWasman"/>
    <exec executable="${package.home}/SUNWasman/createPrototype" dir="../packager-ext" resolveexecutable="true">
        <arg line="${asman.tmp.dir}/share/ ${package.home}/SUNWasman/prototype_com"/>
    </exec> 
</target>
<target name="publish-external-init" depends="publish-init" if="unix">
    <mkdir dir="${install.tmp.dir}/share"/>
    <exec executable="ln" dir="${install.tmp.dir}/share">
        <arg line="-s ${install.dir}/lib ./lib"/>
    </exec>
</target>

<target name="publish-asdemdb-init" depends="publish-init" if="unix"
        description="Publish for the asdebdb package">
    <mkdir dir="${install.tmp.dir}/var" />
    <exec executable="ln" dir="${install.tmp.dir}/var">
    <arg line="-s ${install.dir} ./appserver"/>
    </exec>
</target>

<target name="publish-asu" >
    <echo message="Publishing the license"/>
    <copy file="${appserv.license.txt}"
          todir="${glassfish.home}" overwrite="true" />
     <copy file="${appserv.3rdpartylicense.txt}"
          todir="${glassfish.home}" overwrite="true" />
     <copy file="${appserv.copyright}" 
          todir="${glassfish.home}" overwrite="true" />
     <copy file="${appserv.legalnotice}"
          todir="${glassfish.home}" overwrite="true" />
</target>


<target name="post-bootstrap-unix-pkg-jdk" unless="darwin">
    <!-- jdk packages -->
     <chmod file="${jdk.publish.home}/bin/**" perm="ugo+rx"/>
     <antcall target="do.unzip">
        <param name="name" value="${glassfish.jdk.package.name}"/>
        <param name="version" value="${glassfish.jdk.version}"/>
        <param name="directory" value="${native.package.home}"/>
     </antcall>
</target>

    
<!-- Post bootstrap for jdk -->
<target name="post-bootstrap-nonmac-jdk" unless="darwin">
     <antcall target="do.unzip">
        <param name="name" value="${glassfish.jdk.name}"/>
        <param name="version" value="${glassfish.jdk.version}"/>
        <param name="directory" value="${jdk.publish.home}"/>
     </antcall>
</target>
 
 
Close
loading
Please Confirm
Close