Changes for page Embedding WOFrameworks
Last modified by Gavin Eadie on 2011/07/29 18:09
From version 20.1
edited by David Holt
on 2010/09/27 22:37
on 2010/09/27 22:37
Change comment:
There is no comment for this version
To version 21.1
edited by Pascal Robert
on 2007/10/18 14:26
on 2007/10/18 14:26
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. dholt1 +XWiki.probert - Content
-
... ... @@ -1,42 +40,3 @@ 1 -== WOLips 3.4.x, and later, Side-note == 2 - 3 -{{warning}} 4 -If you are updating an older project, make sure you get the latest build.xml file. Create a new project, then copy/paste the contents of the fresh build.xml file into your project's build.xml file. 5 -{{/warning}} 6 - 7 -For WOLips 3.4.x and later, while embedding is built-in, it's not enabled by default. To enable embedding: 8 - 9 -* make sure you are in the WO Explorer view 10 -* right-click your project folder, select Properties, select WOLips Deployment 11 -* check the related, if not all, options under Embed Frameworks 12 - 13 -To create a versioned/dated bundle of your app and resources: 14 - 15 -* make sure you are in the Navigator view 16 -* edit build.properties, and add: 17 -* ##build.app.name=MyApp-2009-07-14## 18 - 19 -There is a known bug with WO 5.4.x (for those not using the latest Wonder release) regarding proper linking to your web server resources within the embedded frameworks. The WOFrameworksBaseURL isn't set correctly. To do this you'll need to programmatically set this within your Application constructor: 20 - 21 -* ##setFrameworksBaseURL("/WebObjects/MyApp-2009-07-14.woa/Frameworks");## 22 - 23 -Another way to fix this bug is to set the following launch parameter: 24 - 25 -DWOFrameworksBaseURL=/WebObjects/MyApp-2009-07-14.woa/Frameworks 26 - 27 -Within build.properties (I may need to be corrected on this), the best approach to linking your embedded framework's web server resources automatically is to include (however the bug noted above breaks this): 28 - 29 -* ##frameworksBaseURL=/WebObjects/$build.app.name.woa/Frameworks## 30 - 31 -And finally, there is a bug in the build.xml file that you may need to clean-up: 32 -[[http://issues.objectstyle.org/jira/browse/WOL-979]] 33 - 34 -== Introduction == 35 - 36 -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: 37 - 38 -[[Alternative Ant Build Script for Fully Embedded and Split Install Bundles]] 39 - 40 40 == Simple Approach == 41 41 42 42 This simple approach can be used to embed frameworks already **installed** on your development machine right into the app.woa bundle. ... ... @@ -92,42 +92,14 @@ 92 92 \\Embedding these is most useful especially if you the codebase for these, like WOnder frameworks or your own, is frequently updated 93 93 | user.home | /Library/Frameworks/ 94 94 | wo.systemroot | /System/Library/Frameworks/ 95 -\\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. 56 +\\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. | 96 96 97 97 {{note title="Remember to..." bgColor="#FFFFCE"}} 98 98 99 -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.60 +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. 100 100 101 101 {{/note}} 102 102 103 -=== Pre-installing Workspace Frameworks Before Embedded Build === 104 - 105 -You could write a task to install the frameworks directly from the workspace, for example: 106 - 107 -{{code}} 108 - 109 - <!-- Install my own dependent frameworks in final local install location before embedding --> 110 - <target name="installMyFrameworks"> 111 - <ant dir="../WKDemography" target="install" inheritall="false" /> 112 - <ant dir="../WKEmailData" target="install" inheritall="false" /> 113 - <ant dir="../WKEOFExtensions" target="install" inheritall="false" /> 114 - <ant dir="../WKFoundation" target="install" inheritall="false" /> 115 - <ant dir="../WKPrototypes" target="install" inheritall="false" /> 116 - <ant dir="../WKRemoteClient" target="install" inheritall="false" /> 117 - <ant dir="../WKReports" target="install" inheritall="false" /> 118 - <ant dir="../WKWebObjects" target="install" inheritall="false" /> 119 - </target> 120 - 121 -{{/code}} 122 - 123 -... 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: 124 - 125 -{{code}} 126 - 127 - <target name="build.woapp" depends="installMyFrameworks"> 128 - 129 -{{/code}} 130 - 131 131 == Advanced Approach == 132 132 133 133 **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)