Version 51.1 by David Avendasora on 2009/06/27 07:44

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
David Avendasora 51.1 5 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245674441767.png?version=8||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
David Avendasora 51.1 12 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245677004032.png?version=8||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
David Avendasora 51.1 17 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245678323686.png?version=8||align="centre"]]
Ramsey Gurley 23.1 18 Open Terminal.app and run one of the following commands:
19
David Avendasora 41.1 20 sudo java --jar /Developer/WebObjects/Versions/WOInstaller.jar 5.3.3 /Developer/WebObjects/Versions/WebObjects533
21 sudo 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
David Avendasora 51.1 27 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679408792.png?version=8||align="centre"]]
David Avendasora 39.1 28 When the script is done downloading you're 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
David Avendasora 51.1 32 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679819648.png?version=8||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 29.1 35 ==== Copy the default wolips.properties file ====
Ramsey Gurley 23.1 36
David Avendasora 51.1 37 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680007266.png?version=8||align="centre"]]
pgr 29.1 38 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 39
pgr 35.1 40 ==== Modify your new wolips.properties file to point to your newly downloaded version of WebObjects ====
Ramsey Gurley 23.1 41
David Avendasora 51.1 42 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245682066002.png?version=8||align="centre"]]
pgr 35.1 43 The following properties will need to be updated to point to your new WebObjects installation directory:
Ramsey Gurley 23.1 44
pgr 35.1 45 wo.system.root
46 wo.local.root
47 wo.system.frameworks
48 wo.local.frameworks
49 wo.bootstrapjar
50 wo.extensions
51 wo.apps.root
Ramsey Gurley 23.1 52
pgr 29.1 53 ==== Set the Eclipse Workspace to use the newly Installed Version of WebObjects ====
pgr 27.1 54
David Avendasora 51.1 55 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680796194.png?version=8||align="centre"]]
pgr 29.1 56 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 57
pgr 29.1 58 ==== OPTIONAL - Setup Eclipse's Ant Builder to use the newly Installed Version of WebObjects ====
pgr 27.1 59
David Avendasora 51.1 60 [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245681896724.png?version=8||align="centre"]]
pgr 29.1 61 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 62
David Avendasora 51.1 63 ==== OPTIONAL - Building your project from the Command Line Using Ant ====
Kieran Kelleher 49.1 64
David Avendasora 51.1 65 {{color value="#333333"}}
Kieran Kelleher 49.1 66 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.
David Avendasora 51.1 67 {{/color}}
Kieran Kelleher 49.1 68
David Avendasora 51.1 69 {{color value="#333333"}}
70 {code:title=Example}
71 {{/color}}
Kieran Kelleher 49.1 72
David Avendasora 51.1 73 {{color value="#333333"}}
74 $ ant -lib /path/to/woproject.jar -Dwolips.properties=/path/to/wolips.533.properties clean build
75 {{/color}}
Kieran Kelleher 49.1 76
David Avendasora 51.1 77 {{color value="#333333"}}
78 {code}
79 {{/color}}
80
81 ==== OPTIONAL - Building your project using Hudson ====
82
83 {{tip value="Shameless Plug"}}
84 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.
85 {{/tip}}