Changes for page Embedding WOFrameworks
Last modified by Gavin Eadie on 2011/07/29 18:09
From version 28.1
edited by Kieran Kelleher
on 2007/08/15 12:32
on 2007/08/15 12:32
Change comment:
There is no comment for this version
To version 29.1
edited by Kieran Kelleher
on 2008/05/13 12:16
on 2008/05/13 12:16
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -6,21 +6,21 @@ 6 6 7 7 {{code title="Default build.xml snippet"}} 8 8 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 9 +<frameworks root="${wo.wolocalroot}" embed="false"> 10 + <patternset> 11 + <includesfile name="woproject/ant.frameworks.wo.wolocalroot" /> 12 + </patternset> 13 +</frameworks> 14 +<frameworks root="${user.home}" embed="false"> 15 + <patternset> 16 + <includesfile name="woproject/ant.frameworks.user.home" /> 17 + </patternset> 18 +</frameworks> 19 +<frameworks root="${wo.wosystemroot}" embed="false"> 20 + <patternset> 21 + <includesfile name="woproject/ant.frameworks.wo.wosystemroot" /> 22 + </patternset> 23 +</frameworks> 24 24 25 25 {{/code}} 26 26 ... ... @@ -28,39 +28,67 @@ 28 28 29 29 {{code title="Changes to build.xml to embed frameworks installed in /Library/Frameworks dir"}} 30 30 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - 43 - 44 - 45 - 31 +<frameworks root="${wo.wolocalroot}" embed="true"> 32 + <patternset> 33 + <includesfile name="woproject/ant.frameworks.wo.wolocalroot" /> 34 + </patternset> 35 +</frameworks> 36 +<frameworks root="${user.home}" embed="false"> 37 + <patternset> 38 + <includesfile name="woproject/ant.frameworks.user.home" /> 39 + </patternset> 40 +</frameworks> 41 +<frameworks root="${wo.wosystemroot}" embed="false"> 42 + <patternset> 43 + <includesfile name="woproject/ant.frameworks.wo.wosystemroot" /> 44 + </patternset> 45 +</frameworks> 46 46 47 47 {{/code}} 48 48 49 49 The various dirs referenced in the build.xml from which you can select the embed option are: 50 50 51 -|=dir name|=Description 52 -|wo.wolocalroot|/Library/Frameworks/ 53 -\\Embedding these is most useful especially if you the codebase for these, like WOnder frameworks or your own, is frequently updated 54 -|user.home| ,,/,,55 -|wo.systemroot|/System/Library/Frameworks/ 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. 51 +|= dir name |= Description 52 +| wo.wolocalroot | /Library/Frameworks/ 53 +\\Embedding these is most useful especially if you the codebase for these, like WOnder frameworks or your own, is frequently updated 54 +| user.home | /Library/Frameworks/ 55 +| wo.systemroot | /System/Library/Frameworks/ 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. 57 57 58 -{{ paneltitle="Note" bgColor="#FFFFCE"}}58 +{{note title="Remember to..." bgColor="#FFFFCE"}} 59 59 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. 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. See next subsection for one approcah to automating this. 61 61 62 -{{/ panel}}62 +{{/note}} 63 63 64 +=== Pre-installing Workspace Frameworks Before Embedded Build === 65 + 66 +You could write a task to install the frameworks directly from the workspace, for example: 67 + 68 +{{code}} 69 + 70 + <!-- Install my own dependent frameworks in final local install location before embedding --> 71 + <target name="installMyFrameworks"> 72 + <ant dir="../WKDemography" target="install" inheritall="false" /> 73 + <ant dir="../WKEmailData" target="install" inheritall="false" /> 74 + <ant dir="../WKEOFExtensions" target="install" inheritall="false" /> 75 + <ant dir="../WKFoundation" target="install" inheritall="false" /> 76 + <ant dir="../WKPrototypes" target="install" inheritall="false" /> 77 + <ant dir="../WKRemoteClient" target="install" inheritall="false" /> 78 + <ant dir="../WKReports" target="install" inheritall="false" /> 79 + <ant dir="../WKWebObjects" target="install" inheritall="false" /> 80 + </target> 81 + 82 +{{/code}} 83 + 84 +... 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: 85 + 86 +{{code}} 87 + 88 + <target name="build.woapp" depends="installMyFrameworks"> 89 + 90 +{{/code}} 91 + 64 64 == Advanced Approach == 65 65 66 66 **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)