Dashboard > WOProject / WOLips > ... > Tutorials > Split Install Deployment
  WOProject / WOLips Log In View a printable version of the current page.  
  Split Install Deployment
Added by Kieran Kelleher, last edited by Kieran Kelleher on Aug 09, 2007  (view change)
Labels: 
(None)

The Simple Way

One simple change to your build.xml: Simply add the wsDestDir property to the woapplication (or woframework in the case of a framework project) task in your project's build.xml as shown below. As stated by the documentation, presence of that parameter triggers a split install and thus creates an additional woa bundle for the webserver resources.

woapplication opening tag with wsDestDir property
<woapplication name="${project.name}"  stdFrameworks="false"
                                            destDir="${dest.dir}"
                                            customInfoPListContent="${customInfoPListContent}"
                                            principalClass="${principalClass}"
                                            webXML="${webXML}"
                                            webXML_CustomContent="${webXML_CustomContent}"
                                            wsDestDir="/Library/WebServer/Documents">
woframework opening tag with wsDestDir property
<woframework name="${framework.name}"
        	destDir="${dest.dir}"
        	customInfoPListContent="${customInfoPListContent}"
        	principalClass="${principalClass}"
        	eoAdaptorClassName="${eoAdaptorClassName}"
                wsDestDir="/Library/WebServer/Documents">

A Better Way

So that both Install works and ant build into project dist (right-click build.xml -> Run As/Ant Build) provides a split install, make the following 4 1-line changes to your Application build.xml file as shown in snippet below:

setProps target : add wsinstall.dir property
init.install target : add wsdest.dir property
init.build target : add wsdest.dir property
woapplication task : add wsDestDir property

<!-- property determination  -->
    <target name="setProps">
        <property file="${user.home}${file.separator}build.properties"/>
        <property file="build.properties"/>
        <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties"/>
        <condition property="wo.properties.check.failed">
            <not>
                <and>
                    <isset property="wo.wosystemroot"/>
                    <isset property="wo.wolocalroot"/>
                </and>
            </not>
        </condition>
        <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed"/>
        <property name="install.dir" value="${wo.wolocalroot}/Library/WebObjects/Applications"/>
        <property name="wsinstall.dir" value="${wo.wolocalroot}/Library/WebServer/Documents"/>
    </target>

    <!-- basic initializations  -->
    <target name="init.install">
        <tstamp/>
        <property name="dest.dir" value="${install.dir}"/>
        <property name="wsdest.dir" value="${wsinstall.dir}"/>
    </target>

    <target name="init.build">
        <tstamp/>
        <property name="dest.dir" value="dist"/>
        <property name="wsdest.dir" value="dist/wsdocroot"/>
    </target>

    <!-- woproject tasks -->
    <target name="build.woapp">

        <taskdef name="woapplication" classname="org.objectstyle.woproject.ant.WOApplication">
        </taskdef>

        <!-- add webXML="true" to generate a web.xml file -->
        <woapplication name="${project.name}"  stdFrameworks="false"
                                            destDir="${dest.dir}"
                                            customInfoPListContent="${customInfoPListContent}"
                                            principalClass="${principalClass}"
                                            webXML="${webXML}"
                                            webXML_CustomContent="${webXML_CustomContent}"
                                            wsDestDir="${wsdest.dir}">

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators