Wiki source code of Split Install Deployment
Last modified by Paul Hoadley on 2008/09/04 12:55
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
12.1 | 1 | == Introduction == |
2 | |||
![]() |
14.1 | 3 | Below is outlined "simple embedding" concepts, however (% style="text-decoration: underline;" %)full embedding(%%) **and** (% style="text-decoration: underline;" %)split-installing(%%) are really recommended. This provides fully versioned self-contained bundles of both the application deployment bundle and the webserver deployment bundle. Read the docs on that technique for more **advantages**. This technique fully explained along with a ready-to-use ant build script is available at: |
![]() |
12.1 | 4 | |
![]() |
16.1 | 5 | [[doc:WOL.Home.Deprecated info.Alternative Ant Build Script for Fully Embedded and Split Install Bundles.WebHome]] |
![]() |
12.1 | 6 | |
![]() |
3.1 | 7 | == The Simple Way == |
8 | |||
![]() |
17.1 | 9 | 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>>doc:WOL.Home.WOProject-Ant.WOApplication.WebHome]], presence of that parameter triggers a split install and thus creates an additional woa bundle for the webserver resources. |
![]() |
3.1 | 10 | |
![]() |
16.1 | 11 | {{code title="woapplication opening tag with wsDestDir property"}}<woapplication name="${project.name}" stdFrameworks="false" |
![]() |
9.1 | 12 | destDir="${dest.dir}" |
13 | customInfoPListContent="${customInfoPListContent}" | ||
14 | principalClass="${principalClass}" | ||
15 | webXML="${webXML}" | ||
16 | webXML_CustomContent="${webXML_CustomContent}" | ||
![]() |
16.1 | 17 | wsDestDir="/Library/WebServer/Documents">{{/code}} |
![]() |
9.1 | 18 | |
![]() |
11.1 | 19 | {{code title="woframework opening tag with wsDestDir property"}} |
20 | |||
21 | <woframework name="${framework.name}" | ||
22 | destDir="${dest.dir}" | ||
23 | customInfoPListContent="${customInfoPListContent}" | ||
24 | principalClass="${principalClass}" | ||
25 | eoAdaptorClassName="${eoAdaptorClassName}" | ||
26 | wsDestDir="/Library/WebServer/Documents"> | ||
27 | |||
28 | {{/code}} | ||
29 | |||
![]() |
9.1 | 30 | == A Better Way == |
31 | |||
![]() |
14.1 | 32 | 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: |
![]() |
9.1 | 33 | |
34 | setProps target : add wsinstall.dir property | ||
![]() |
14.1 | 35 | init.install target : add wsdest.dir property |
36 | init.build target : add wsdest.dir property | ||
37 | woapplication task : add wsDestDir property | ||
![]() |
9.1 | 38 | |
![]() |
3.1 | 39 | {{code}} |
40 | |||
![]() |
9.1 | 41 | <!-- property determination --> |
42 | <target name="setProps"> | ||
43 | <property file="${user.home}${file.separator}build.properties"/> | ||
44 | <property file="build.properties"/> | ||
45 | <property file="${user.home}${file.separator}Library${file.separator}wobuild.properties"/> | ||
46 | <condition property="wo.properties.check.failed"> | ||
47 | <not> | ||
48 | <and> | ||
49 | <isset property="wo.wosystemroot"/> | ||
50 | <isset property="wo.wolocalroot"/> | ||
51 | </and> | ||
52 | </not> | ||
53 | </condition> | ||
54 | <fail message="Could not find ${user.home}${file.separator}Library${file.separator}wobuild.properties." if="wo.properties.check.failed"/> | ||
55 | <property name="install.dir" value="${wo.wolocalroot}/Library/WebObjects/Applications"/> | ||
56 | <property name="wsinstall.dir" value="${wo.wolocalroot}/Library/WebServer/Documents"/> | ||
57 | </target> | ||
58 | |||
59 | <!-- basic initializations --> | ||
60 | <target name="init.install"> | ||
61 | <tstamp/> | ||
62 | <property name="dest.dir" value="${install.dir}"/> | ||
63 | <property name="wsdest.dir" value="${wsinstall.dir}"/> | ||
64 | </target> | ||
65 | |||
66 | <target name="init.build"> | ||
67 | <tstamp/> | ||
68 | <property name="dest.dir" value="dist"/> | ||
69 | <property name="wsdest.dir" value="dist/wsdocroot"/> | ||
70 | </target> | ||
71 | |||
72 | <!-- woproject tasks --> | ||
73 | <target name="build.woapp"> | ||
74 | |||
75 | <taskdef name="woapplication" classname="org.objectstyle.woproject.ant.WOApplication"> | ||
76 | </taskdef> | ||
77 | |||
78 | <!-- add webXML="true" to generate a web.xml file --> | ||
![]() |
7.1 | 79 | <woapplication name="${project.name}" stdFrameworks="false" |
![]() |
3.1 | 80 | destDir="${dest.dir}" |
81 | customInfoPListContent="${customInfoPListContent}" | ||
82 | principalClass="${principalClass}" | ||
83 | webXML="${webXML}" | ||
84 | webXML_CustomContent="${webXML_CustomContent}" | ||
![]() |
9.1 | 85 | wsDestDir="${wsdest.dir}"> |
![]() |
3.1 | 86 | |
87 | {{/code}} |