Changes for page Embedding WOFrameworks

Last modified by Gavin Eadie on 2011/07/29 18:09

From version 56.1
edited by Kieran Kelleher
on 2008/09/04 12:55
Change comment: There is no comment for this version
To version 54.1
edited by Ulrich Köster
on 2006/09/08 06:00
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.kieran
1 +XWiki.uli
Content
... ... @@ -1,111 +106,6 @@
1 -== Introduction ==
2 -
3 -Below is outlined "simple embedding" concepts, however __full embedding__ **and** __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:
4 -
5 -[[Alternative Ant Build Script for Fully Embedded and Split Install Bundles]]
6 -
7 -== Simple Approach ==
8 -
9 -This simple approach can be used to embed frameworks already **installed** on your development machine right into the app.woa bundle.
10 -
11 -Open your build.xml project file and change embed="false" to embed="true" for the appropriate directory paths in this section of the build.xml file inside the woapplication task
12 -
13 -{{code title="Default build.xml snippet"}}
14 -
15 -<frameworks root="${wo.wolocalroot}" embed="false">
16 - <patternset>
17 - <includesfile name="woproject/ant.frameworks.wo.wolocalroot" />
18 - </patternset>
19 -</frameworks>
20 -<frameworks root="${user.home}" embed="false">
21 - <patternset>
22 - <includesfile name="woproject/ant.frameworks.user.home" />
23 - </patternset>
24 -</frameworks>
25 -<frameworks root="${wo.wosystemroot}" embed="false">
26 - <patternset>
27 - <includesfile name="woproject/ant.frameworks.wo.wosystemroot" />
28 - </patternset>
29 -</frameworks>
30 -
31 -{{/code}}
32 -
33 -The most common choice is to embed locally installed WOnder and 3rd party frameworks that your app references by setting embed="true" on the wolocalroot frameworks dir as shown below:
34 -
35 -{{code title="Changes to build.xml to embed frameworks installed in /Library/Frameworks dir"}}
36 -
37 -<frameworks root="${wo.wolocalroot}" embed="true">
38 - <patternset>
39 - <includesfile name="woproject/ant.frameworks.wo.wolocalroot" />
40 - </patternset>
41 -</frameworks>
42 -<frameworks root="${user.home}" embed="false">
43 - <patternset>
44 - <includesfile name="woproject/ant.frameworks.user.home" />
45 - </patternset>
46 -</frameworks>
47 -<frameworks root="${wo.wosystemroot}" embed="false">
48 - <patternset>
49 - <includesfile name="woproject/ant.frameworks.wo.wosystemroot" />
50 - </patternset>
51 -</frameworks>
52 -
53 -{{/code}}
54 -
55 -The various dirs referenced in the build.xml from which you can select the embed option are:
56 -
57 -|= dir name |= Description
58 -| wo.wolocalroot | /Library/Frameworks/
59 -\\Embedding these is most useful especially if you the codebase for these, like WOnder frameworks or your own, is frequently updated
60 -| user.home | /Library/Frameworks/
61 -| wo.systemroot | /System/Library/Frameworks/
62 -\\This is where Apple's WebObjects frameworks are installed and if your WebObjects version is consistent between your deployment and development platforms, then embedding these is not of much benefit.
63 -
64 -{{note title="Remember to..." bgColor="#FFFFCE"}}
65 -
66 -If you are working with framework source in your Eclipse workspace (which you should be\!), then it is critical that you build and install all frameworks before building the deployment bundles to ensure that the embedded frameworks are the same as the source you have been developing and testing with. See next subsection for one approcah to automating this.
67 -
68 -{{/note}}
69 -
70 -=== Pre-installing Workspace Frameworks Before Embedded Build ===
71 -
72 -You could write a task to install the frameworks directly from the workspace, for example:
73 -
74 -{{code}}
75 -
76 - <!-- Install my own dependent frameworks in final local install location before embedding -->
77 - <target name="installMyFrameworks">
78 - <ant dir="../WKDemography" target="install" inheritall="false" />
79 - <ant dir="../WKEmailData" target="install" inheritall="false" />
80 - <ant dir="../WKEOFExtensions" target="install" inheritall="false" />
81 - <ant dir="../WKFoundation" target="install" inheritall="false" />
82 - <ant dir="../WKPrototypes" target="install" inheritall="false" />
83 - <ant dir="../WKRemoteClient" target="install" inheritall="false" />
84 - <ant dir="../WKReports" target="install" inheritall="false" />
85 - <ant dir="../WKWebObjects" target="install" inheritall="false" />
86 - </target>
87 -
88 -{{/code}}
89 -
90 -... and then you could put a depends attribute on the build target to ensure the frameworks are installed before the embedded build task is executed:
91 -
92 -{{code}}
93 -
94 - <target name="build.woapp" depends="installMyFrameworks">
95 -
96 -{{/code}}
97 -
98 -== Advanced Approach ==
99 -
100 -**Caveat:** This example assumes that each framework you want to embed has an ant "build.xml" file with a "compileAndBuild" target. For frameworks you create yourself using WOLips, you will have this, but for a case where you are checking out individual Wonder framework projects from CVS, then you probably will not have such a build.xml file, so this approach is not quick to implement in that case unless you want to spend a lot of time working on ant build files to resolve the missing build.xml having a compileAndBuild target for those external projects. (KK 3/30/2007)
101 -
102 -----
103 -
104 -See also [[FrameworkSet>>WOProject-FrameworkSet]] documentation.
105 -
106 106  Example for embedding WOFrameworks.
107 107  
108 -It's often a good idea to create your own targets in the build.xml or even create your own build.xml (with a different name). This leaves the door open for an update of the default build.xml.
3 +It's an good idea is create your own targets in the build.xml or even create your own build.xml (with a different name). This leaves the door open for an update of the default build.xml.
109 109  
110 110  Assume two projects: One named Foo( a framework) and the other named Uli (an application). The parent folder has another folder named packandgo.
111 111  
... ... @@ -116,7 +116,7 @@
116 116  
117 117  {{code}}
118 118  
119 -<!-- package and go example-->
14 +<!-- package and go example-->
120 120  <frameworks root="../packageandgo/frameworks" embed="true">
121 121   <include name="*.framework"/>
122 122  </frameworks>
... ... @@ -123,11 +123,10 @@
123 123  
124 124  {{/code}}
125 125  
126 -2 compile target
21 +2 compile target
127 127  
128 128  {{code}}
129 -
130 -<!-- package and go example-->
24 +
131 131  <fileset dir="../packageandgo/frameworks">
132 132   <include name = "**/*.jar"/>
133 133  </fileset>
... ... @@ -134,8 +134,8 @@
134 134  
135 135  {{/code}}
136 136  
31 +
32 +
137 137  The [[^build.xml]] from the packageandgo folder:
138 138  
139 -Just invoke ant in the packageandgo folder and grap the App from the applications folder within the packageandgo folder.
140 -
141 -[[image:FoldersAfterBuild.png]]
35 +Just invoke ant in the packageandgo folder and grap the App from applications folder within the packageandgo folder