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-b10a / installer / build.xml

Size: 8095 bytes, 1 line
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- 
/* 
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 
* 
* Copyright 2007-2008 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 https://glassfish.dev.java.net/public/CDDL+GPL.html 
* 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]" 
* 
* Contributor(s): 
* 
* 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 
* holder. 
*/ 
--> 
<!DOCTYPE project []>

<project name="GlassFish Installer build" default="all" basedir=".">  

    <property name="component.name" value="installer"/>
    <property name="src.dir" value="${basedir}/src/main/java"/>
    <property name="component.classes.dir" value="${basedir}/target/classes"/>
    <property name="component.lib.dir" value="${basedir}/target/lib"/>
    <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
    <property name="stage.dir" value="${basedir}/target/stage" />
    <property name="tmp.dir" value="${basedir}/target/tmp" />
    <property name="resources.dir" value="${basedir}/src/main/resources" />
    <property name="gf.zip.dir" value="${basedir}/../packager/build" />
      
    <!-- all -->
    <target name="all" depends="extract.oi, compile, assemble, package"  description="Build entire component">
    </target>

    <target name="extract.oi"  description="Extracting openInstaller files">
        <mkdir dir="${stage.dir}"/>
        <unzip src="${maven.repo.local}/org/openinstaller/engine/0.9.4/engine-0.9.4.zip"
            dest="${stage.dir}"/>
        <unzip src="${maven.repo.local}/org/openinstaller/resources/0.9.4/resources-0.9.4.zip"
            dest="${stage.dir}"/>
        <chmod file="${stage.dir}/install/bin/engine-wrapper" perm="ugo+rx"/>
    </target>

    <target name="compile"  description="Compiling configurator">

         <mkdir dir="${component.classes.dir}"/>

         <javac srcdir="${src.dir}" 
               destdir="${component.classes.dir}"               
               failonerror="true">
               <classpath>              
                   <pathelement location="${stage.dir}/install/lib/engine.jar"/>
                   <pathelement location="${stage.dir}/install/lib/config.jar"/>
                   <pathelement location="${stage.dir}/install/lib/providers/providers.jar"/>
               </classpath>
        </javac>
 
        <unjar src="${stage.dir}/install/lib/providers/providers.jar"
            dest="${tmp.dir}" />

        <copy todir="${tmp.dir}" >
            <fileset dir="${component.classes.dir}">
                <include name="**/*.class"/>
            </fileset>
        </copy>

        <jar jarfile="${stage.dir}/install/lib/providers/providers.jar"
            basedir="${tmp.dir}"
            manifest="${tmp.dir}/META-INF/MANIFEST.MF">
        </jar>

        <delete dir="${tmp.dir}" />

    </target>

    <target name="assemble"  description="Assembling installer distribution layout">
         <mkdir dir="${stage.dir}/metadata"/>
         <mkdir dir="${stage.dir}/Product/Packages"/>

         <echo message="Staging installer metadata"/>
         <copy todir="${stage.dir}/metadata/dependency">
               <fileset dir="${resources.dir}/dependency" excludes=".svn"/> 
         </copy>
         <copy todir="${stage.dir}/metadata/model">
               <fileset dir="${resources.dir}/model" excludes=".svn"/>
         </copy>
         <copy todir="${stage.dir}/metadata/templates">
               <fileset dir="${resources.dir}/templates" excludes=".svn"/>
         </copy>
         <copy todir="${stage.dir}/metadata/view">
               <fileset dir="${resources.dir}/view" excludes=".svn"/> 
         </copy>
         <copy todir="${stage.dir}/metadata"
               file="${resources.dir}/pagesequence.xml">
         </copy>
         <copy todir="${stage.dir}/metadata"
               file="${resources.dir}/pagesequence.properties">
         </copy>

         <echo message="Staging wrappers"/>

         <copy todir="${stage.dir}">
               <fileset dir="${resources.dir}/wrappers" excludes=".svn,setup.exe,wrapper.sh"/>               
         </copy>

         <chmod file="${stage.dir}/product-installer.sh" perm="ugo+rx"/>

         <echo message="Staging product payload"/>

         <echo message="Copying Glassfish zip file"/>
 
         <copy tofile="${stage.dir}/Product/Packages/glassfish.zip"
               file="${gf.zip.dir}/V3IPSImage_Installer.zip" />

         <echo message="Copying openInstaller zip files"/>
 
         <copy tofile="${stage.dir}/Product/Packages/Engine.zip"
               file="${maven.repo.local}/org/openinstaller/engine/0.9.4/engine-0.9.4.zip"/>

         <copy tofile="${stage.dir}/Product/Packages/Resources.zip"
               file="${maven.repo.local}/org/openinstaller/resources/0.9.4/resources-0.9.4.zip"/>
               
         <echo message="Creating icons zip file"/>

         <copy todir="${tmp.dir}/glassfish/icons">
             <fileset dir="${resources.dir}/icons" excludes=".svn"/>
         </copy>

         <zip destfile="${stage.dir}/Product/Packages/icons.zip"
             basedir="${tmp.dir}" />

         <delete dir="${tmp.dir}/glassfish" />

         <echo message="Creating updatetool bootstrap zip file"/>

         <copy tofile="${tmp.dir}/updatetool/lib/ucbootstrap.jar"
             file="${maven.repo.local}/com/sun/pkg/client/ucbootstrap/0.0.0.2/ucbootstrap-0.0.0.2.jar"/>          
         <zip destfile="${stage.dir}/Product/Packages/updatetool.zip"
             basedir="${tmp.dir}" />

         <delete dir="${tmp.dir}" />
         
         

    </target>

    <target name="package"  description="Packaging installer distributions">

         <zip destfile="${basedir}/target/installer_distro.zip"
             basedir="${stage.dir}" />
         <copy tofile="${basedir}/target/setup-windows" file="${resources.dir}/wrappers/setup.exe"/>
         <concat append="true" encoding="ISO-8859-1" destfile="${basedir}/target/setup-windows">
            <fileset dir="${basedir}/target" includes="installer_distro.zip"/>
        </concat>
        <jar jarfile="${basedir}/target/installer_distro.jar"
            basedir="${stage.dir}">            
        </jar>
        <copy tofile="${basedir}/target/setup-unix" file="${resources.dir}/wrappers/wrapper.sh"/>
        <concat append="true" encoding="ISO-8859-1" destfile="${basedir}/target/setup-unix">
           <fileset dir="${basedir}/target" includes="installer_distro.jar"/>
        </concat>
    </target>

</project>
 
 
Close
loading
Please Confirm
Close