Version 31.1 by pgr on 2010/02/12 16:49

Hide last authors
David Avendasora 25.1 1 The following are instructions on how to setup Eclipse / WOLips so you can work with mulitple versions of WebObjects. This tutorial will demonstrate setting up your environment simply for WebObjects 5.3.3 and 5.4.3 but there's no reason you can't have different setups based on customer or project instead.
Ramsey Gurley 23.1 2
3 ==== Create New Directory Structure ====
4
pgr 27.1 5 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245674441767.png?version=10||align="centre"]]
pgr 29.1 6 The first thing we need to do is to create a new directory structure to allow for multiple versions of WebObjects to be installed in. This new directory structure basically creates a new root level that WOLips will look in for all frameworks used by a given project or workspace. This directory structure can be anything you wish. For demonstration purposes, I'm going to create it under the Developer directory.
Ramsey Gurley 23.1 7
pgr 29.1 8 Create: /Developer/WebObjects/Versions/
Ramsey Gurley 23.1 9
10 ==== Download WOInstaller.jar ====
11
pgr 27.1 12 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245677004032.png?version=10||align="centre"]]
pgr 29.1 13 We now need to download the WOInstaller.jar file from http:~/~/webobjects.mdimension.com/wolips/ and save it into the Versions directory we just created.
Ramsey Gurley 23.1 14
15 ==== Use WOInstaller.jar to download WebObjects ====
16
pgr 27.1 17 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245678323686.png?version=10||align="centre"]]
Ramsey Gurley 23.1 18 Open Terminal.app and run one of the following commands:
19
pgr 29.1 20 java --jar /Developer/WebObjects/Versions/WOInstaller.jar 5.3.3 /Developer/WebObjects/Versions/WebObjects533
21 java --jar /Developer/WebObjects/Versions/WOInstaller.jar 5.4.3 /Developer/WebObjects/Versions/WebObjects543
Ramsey Gurley 23.1 22
pgr 29.1 23 Depending upon which version of WO you would like to download.
Ramsey Gurley 23.1 24
25 ==== Installed Versions ====
26
pgr 27.1 27 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679408792.png?version=10||align="centre"]]
pgr 29.1 28 When the script is done downloading, your directory should look something like this. At this point you could rename the directory to something like MyCustomer or MyProject. For this demonstration we'll just leave it named as is.
Ramsey Gurley 23.1 29
30 ==== Open Eclipse / WOLips ====
31
pgr 27.1 32 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679819648.png?version=10||align="centre"]]
pgr 29.1 33 You need to launch Eclipse and WOLips at least once so that it will create the default wolips.properties file in ,,/Library/Application Support/WOLips/. If you've already been using WOlips, you can skip this step.,,
Ramsey Gurley 23.1 34
pgr 27.1 35 {{note title="Note"}}
Ramsey Gurley 23.1 36
pgr 27.1 37 Feb 12, 2010: At least with WOLips 3.4.5830, launching Eclipse/WOLips is not sufficient to get it to create the default {{wolips.properties}}. You need to create a project; a new WebObjects Application project will do nicely.
Ramsey Gurley 23.1 38
pgr 27.1 39 {{/note}}
Ramsey Gurley 23.1 40
pgr 29.1 41 ==== Copy the default wolips.properties file ====
Ramsey Gurley 23.1 42
pgr 27.1 43 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680007266.png?version=10||align="centre"]]
pgr 29.1 44 Select the wolips.properties file and make a copy of it. Then rename the copy to be wolips.yourversion.properties. In reality, you can rename it however you'd like, for example: wolips.properties.533, 533.wolips.properties, but I find that putting the version number in the middle will keep all the different versions together, and will not mess with the extension mapping.
Ramsey Gurley 23.1 45
pgr 29.1 46 ==== Modify your new ##wolips.properties## file to point to your newly downloaded version of WebObjects ====
Ramsey Gurley 23.1 47
pgr 27.1 48 As an example, if you downloaded WebObjects 5.3.3 into ##/Developer/WebObjects/Versions/WebObjects533##, then modify your new ##wolips.533.properties## file as follows (substituting your username for ##bubba##, of course):
Ramsey Gurley 23.1 49
pgr 27.1 50 {{noformat}}
Ramsey Gurley 23.1 51
pgr 27.1 52 wo.network.root=/Network
53 wo.system.root=/Developer/WebObjects/Versions/WebObjects533/System
54 wo.local.root=/Developer/WebObjects/Versions/WebObjects533
55 wo.user.root=/Users/bubba
56
57 wo.network.frameworks=/Network/Library/Frameworks
58 wo.system.frameworks=/Developer/WebObjects/Versions/WebObjects533/System/Library/Frameworks
59 wo.local.frameworks=/Developer/WebObjects/Versions/WebObjects533/Library/Frameworks
60 wo.user.frameworks=/Users/bubba/Library/Frameworks
61
62 wo.bootstrapjar=/Developer/WebObjects/Versions/WebObjects533/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
63 wo.extensions=/Developer/WebObjects/Versions/WebObjects533/Library/WebObjects/Extensions
64 wo.apps.root=/Developer/WebObjects/Versions/WebObjects533/Library/WebObjects/Applications
65
pgr 31.1 66 wo.api.root=/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.WebObjectsReference.docset/Contents/Resources/
67 Documents/documentation/InternetWeb/Reference/WO542Reference
pgr 27.1 68
69 {{/noformat}}
70
pgr 31.1 71 {{warning title="Warning"}}
72
73 That last line, for {{wo.api.root}}, should be entered _all on one line_. I broke it in half here only to keep the wiki's window width relatively small!
74
75 {{/warning}}
76
pgr 29.1 77 ==== Set the Eclipse Workspace to use the newly Installed Version of WebObjects ====
pgr 27.1 78
79 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680796194.png?version=10||align="centre"]]
pgr 29.1 80 To tell the Eclipse/WOLips incremental builder where to find the version of WebObjects you want to use, you need to give it the name of the modified wolips.properties file. You do this by going Under the Eclipse menu, selecting Preferences, then selecting the "WOLips" tab at the right, expand it and finally selecting "Build". Enter in the file name of the wolips.properties file that you just modified.
pgr 27.1 81
pgr 29.1 82 ==== OPTIONAL - Setup Eclipse's Ant Builder to use the newly Installed Version of WebObjects ====
pgr 27.1 83
pgr 29.1 84 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245681896724.png?version=10||align="centre"]]
85 Currently, the Eclipse Ant builder is not controlled by the "WOLips -> Build" setting in Eclipse's Preferences. You need to explicitly tell it to use your modified wolips.properties file. In your project, open the build.properties file in your project and add the fully-qualified path to your customized wolips.properties file.
pgr 27.1 86
87 ==== OPTIONAL - Building your project from the Command Line Using Ant ====
88
pgr 29.1 89 {{color value="#333333"}}
90 Along with the usual argument that tells ant where the woproject.jar file is, you simply add another argument using the standard java command line property argument. Essentially we set a property telling the build.xml where the wolips properties file is and the build.xml in turn reads in all the properties from that.
91 {{/color}}
pgr 27.1 92
pgr 29.1 93 {{color value="#333333"}}
94 {code:title=Example}$ ant -lib /path/to/woproject.jar -Dwolips.properties=/path/to/wolips.533.properties clean build{code}
95 {{/color}}
pgr 27.1 96
97 ==== OPTIONAL - Building your project using Hudson ====
98
99 {{tip title="Shameless Plug"}}
100 Come to [WOWODC-East|http://www.wocommunity.org/wowodc09/east/index.html] for hands-on labs demonstrating how to integrate multiple WebObjects installations with Hudson.
101 {{/tip}}