Wiki source code of Using WOLips With Multiple Versions of WebObjects
Version 39.1 by David Avendasora on 2009/08/18 01:55
Show last authors
author | version | line-number | content |
---|---|---|---|
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. | ||
2 | |||
3 | ==== Create New Directory Structure ==== | ||
4 | |||
5 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245674441767.png?version=10||align="centre"]] | ||
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. | ||
7 | |||
8 | Create: /Developer/WebObjects/Versions/ | ||
9 | |||
10 | ==== Download WOInstaller.jar ==== | ||
11 | |||
12 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245677004032.png?version=10||align="centre"]] | ||
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. | ||
14 | |||
15 | ==== Use WOInstaller.jar to download WebObjects ==== | ||
16 | |||
17 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245678323686.png?version=10||align="centre"]] | ||
18 | Open Terminal.app and run one of the following commands: | ||
19 | |||
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 | ||
22 | |||
23 | Depending upon which version of WO you would like to download. | ||
24 | |||
25 | ==== Installed Versions ==== | ||
26 | |||
27 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679408792.png?version=10||align="centre"]] | ||
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. | ||
29 | |||
30 | ==== Open Eclipse / WOLips ==== | ||
31 | |||
32 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679819648.png?version=10||align="centre"]] | ||
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.,, | ||
34 | |||
35 | ==== Copy the default wolips.properties file ==== | ||
36 | |||
37 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680007266.png?version=10||align="centre"]] | ||
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. | ||
39 | |||
40 | ==== Modify your new wolips.properties file to point to your newly downloaded version of WebObjects ==== | ||
41 | |||
42 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245682066002.png?version=10||align="centre"]] | ||
43 | The following properties will need to be updated to point to your new WebObjects installation directory: | ||
44 | |||
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 | ||
52 | |||
53 | ==== Set the Eclipse Workspace to use the newly Installed Version of WebObjects ==== | ||
54 | |||
55 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680796194.png?version=10||align="centre"]] | ||
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. | ||
57 | |||
58 | ==== OPTIONAL - Setup Eclipse's Ant Builder to use the newly Installed Version of WebObjects ==== | ||
59 | |||
60 | [[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245681896724.png?version=10||align="centre"]] | ||
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. | ||
62 | |||
63 | ==== OPTIONAL - Building your project from the Command Line Using Ant ==== | ||
64 | |||
65 | {{color value="#333333"}} | ||
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. | ||
67 | {{/color}} | ||
68 | |||
69 | {{color value="#333333"}} | ||
70 | {code:title=Example}$ ant -lib /path/to/woproject.jar -Dwolips.properties=/path/to/wolips.533.properties clean build{code} | ||
71 | {{/color}} | ||
72 | |||
73 | ==== OPTIONAL - Building your project using Hudson ==== | ||
74 | |||
75 | {{tip title="Shameless Plug"}} | ||
76 | 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. | ||
77 | {{/tip}} |