Last modified by Pascal Robert on 2012/07/21 20:39

From version 56.1
edited by George Domurot
on 2009/07/14 10:03
Change comment: There is no comment for this version
To version 64.1
edited by Pascal Robert
on 2012/07/21 20:39
Change comment: Migrated to Confluence 4.0

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.gedo820
1 +XWiki.probert
Content
... ... @@ -4,63 +4,61 @@
4 4  
5 5  == WOLips 3.4.x, and later, Side-note ==
6 6  
7 -For WOLips 3.4.x and later, while embedding is built-in, it's not enabled by default. To enable embedding:
7 +{{warning}}
8 +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.
9 +{{/warning}}
8 8  
11 +For WOLips 3.4.x and later, while embedding is built-in, it's not enabled by default. To enable embedding:
12 +
9 9  * make sure you are in the WO Explorer view
10 10  * right-click your project folder, select Properties, select WOLips Deployment
11 11  * check the related, if not all, options under Embed Frameworks
12 12  
13 -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.
14 -
15 15  To create a versioned/dated bundle of your app and resources:
16 16  
17 17  * make sure you are in the Navigator view
18 18  * edit build.properties, and add:
19 -** build.app.name=MyApp-2009-07-14
21 +* {{code language="none"}}build.app.name=MyApp-2009-07-14{{/code}}
20 20  
21 -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):
23 +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:
22 22  
23 -*
24 -** frameworksBaseURL=/WebObjects/${{build.app.name}}{{/build.app.name}}.woa/Frameworks
25 +* {{code language="none"}}setFrameworksBaseURL("/WebObjects/MyApp-2009-07-14.woa/Frameworks");{{/code}}
25 25  
26 -And finally, there is a bud in the build.xml file that you may need to clean-up:
27 -[[http://issues.objectstyle.org/jira/browse/WOL-979]]
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 28  
29 +* {{code language="none"}}frameworksBaseURL=/WebObjects/${build.app.name}.woa/Frameworks{{/code}}
30 +
29 29  == Introduction ==
30 30  
31 -The previous tutorial articles provide details of customization of the default ant build script that is present in your WebObjects projects. This article provides a fully custom build script that you can just drop into your project and use it as an alternative to the default build.xml. This script is called the "split//embedded//build" script. Along with providing the script, this article explains in detail what deployment artifacts are produced by the build. Hopefully the functionality in this script will make their way into the standard script someday with configuration parameters settable in a simple way in the build.properties file.
33 +The previous tutorial articles provide details of customization of the default ant build script that is present in your WebObjects projects. This article provides a fully custom build script that you can just drop into your project and use it as an alternative to the default build.xml. This script is called the "split_embedded_build" script. Along with providing the script, this article explains in detail what deployment artifacts are produced by the build. Hopefully the functionality in this script will make their way into the standard script someday with configuration parameters settable in a simple way in the build.properties file.
32 32  
33 33  == Pre-requisites ==
34 34  
35 -This [[script>>^split_embedded_build.xml]] only works with the modern WOLips project format and the WOnderApplication project template format (since the layout of regular projects is now similar to Wonder layout). However the script is easily changed to accommodate the "old" standard format by changing the dir names in the script (for example "Sources" in the new project layout was "src" in the old layout)
37 +This [[script>>attach:split_embedded_build.xml]] only works with the modern WOLips project format and the WOnderApplication project template format (since the layout of regular projects is now similar to Wonder layout). However the script is easily changed to accommodate the "old" standard format by changing the dir names in the script (for example "Sources" in the new project layout was "src" in the old layout)
36 36  
37 37  {{info title="Modern WebObjects Project Layout"}}
38 -
39 39  This layout is the standard layout for all WebObjects projects created by WOLips (rev #4735 at least). The distinct folder names indicate if your project is in this modern format and if yours is the same, then this ant script should work.
40 40  
41 -!modern_project_layout.jpg!
42 -
42 +[[image:attach:modern_project_layout.jpg]]
43 43  {{/info}}
44 44  
45 45  == Installation and Usage of the Script ==
46 46  
47 -Have no fear ;-) , you will not break anything by dropping this script as is into your project and trying it out. You can just use it as is without replacing your default build.xml
47 +Have no fear , you will not break anything by dropping this script as is into your project and trying it out. You can just use it as is without replacing your default build.xml
48 48  
49 -* So, download the [[script>>^split_embedded_build.xml]] by right-clicking this [[link>>^split_embedded_build.xml]] and selecing Save As... or whatever your browser uses for saving contents at a link destination.
49 +* So, download the [[script>>attach:split_embedded_build.xml]] by right-clicking this [[link>>attach:split_embedded_build.xml]] and selecing Save As... or whatever your browser uses for saving contents at a link destination.
50 50  * Drag it to the root of your project.
51 51  
52 -* Open the Ant run configuration for the script by right-clicking on the script and selecting the menu shown below.
52 +* Open the Ant run configuration for the script by right-clicking on the script and selecting the menu shown below.
53 53  
54 54  {{info title="Using the Ant Script"}}
55 - !running_the_script.jpg!
56 -
55 +[[image:attach:running_the_script.jpg]]
57 57  {{/info}}
58 58  
59 -* Next select the "clean" and compileAndBuild" tasks. If necessary use the "Order..." button to ensure that "clean" comes before "compileAndBuild".
58 +* Next select the "clean" and compileAndBuild" tasks. If necessary use the "Order..." button to ensure that "clean" comes before "compileAndBuild".
60 60  
61 61  {{info title="Configure the Ant Tasks to be run"}}
62 - !ant_tasks.jpg!
63 -
61 +[[image:attach:ant_tasks.jpg]]
64 64  {{/info}}
65 65  
66 66  * Click the Run button to run the ant script and your fully embedded split install deployment bundles will be created in the "dist" folder.
... ... @@ -76,8 +76,7 @@
76 76  OK, so getting to the point, an optional custom app name can be set in the project's build.properties file by simply adding a property "build.app.name" as shown below.
77 77  
78 78  {{info title="Customizing the Application Build Name"}}
79 - !custom_app_name.jpg!
80 -
77 +[[image:attach:custom_app_name.jpg]]
81 81  {{/info}}
82 82  
83 83  == Features ==
... ... @@ -89,15 +89,13 @@
89 89  * Self-contained deployment bundles - all required frameworks are embedded - minimal dependency on target server configuration and versions. For example, there is no need to install Wonder frameworks on your deployment server since the ones you developed and tested with are embedded in the deployment bundles. Experience has shown that this improves consistency of deployment reliability.
90 90  * Compressed gzipped tar archives of both application and webserver bundles are created, ready for copying to target server(s)
91 91  ** This is easily decompressed on the server using
92 -** $ sudo tar xvzf bundle.tar.gz
89 +** $ sudo tar -xvzf bundle.tar.gz
93 93  
94 94  == Anatomy of Embedded Split Install Bundles produced by this Ant Script ==
95 95  
96 96  {{info title="The Deployment Files"}}
97 -
98 98  The two compressed "ready-to-deploy" bundles are highlighted below
99 -!build_artifacts.jpg!
100 -
95 +[[image:attach:build_artifacts.jpg]]
101 101  {{/info}}
102 102  
103 103  The notable aspects of the embedded build structure are shown below.
... ... @@ -105,11 +105,10 @@
105 105  === Application Bundle ===
106 106  
107 107  {{info title="Embedded Application Bundle Layout"}}
103 +[[image:attach:app_bundle_layout.jpg]]
108 108  
109 -!app_bundle_layout.jpg!
110 110  * Opening the app executable (command line script at bundle root having the application name as its name) and looking at the end will reveal that the WOFrameworksBaseURL references the frameworks inside the webserver embedded bundle.
111 111  * Examining the Contents/MacOS/MacOSClassPath.txt file will reveal that the java classpath refers to all the jars inside the embedded bundle.
112 -
113 113  {{/info}}
114 114  
115 115  The application bundle typically gets installed as follows:
... ... @@ -116,13 +116,12 @@
116 116  
117 117  * Install Location = /Library/WebObjects/Applications/
118 118  * chown (ownership) = appserver:appserveradm
119 -* chmod (permissions) = 755 (750 if you wish, but your server login id needs to be a member of appserveradm group to cd into the bundle)
113 +* chmod (permissions) = 755 (750 if you wish, but your server login id needs to be a member of appserveradm group to cd into the bundle)
120 120  
121 121  === WebServer Bundle ===
122 122  
123 123  {{info title="Embedded WebServer Bundle Layout"}}
124 - !webserver_bundle_layout.jpg!
125 -
118 +[[image:attach:webserver_bundle_layout.jpg]]
126 126  {{/info}}
127 127  
128 128  The webserver bundle typically gets installed as follows: