Last modified by D Tim Cummings on 2022/07/27 02:24

From version 72.1
edited by ted_archibald
on 2015/02/20 00:15
Change comment: Migrated to Confluence 5.3
To version 69.1
edited by David Avendasora
on 2009/06/27 07:51
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ted_archibald
1 +XWiki.avendasora
Content
... ... @@ -1,164 +1,77 @@
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.
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 2  
3 3  ==== Create New Directory Structure ====
4 4  
5 -[[image:attach:media_1245674441767.png]]
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.
6 6  
7 -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 {{code language="none"}}/Developer{{/code}} directory.
8 +Create: /Developer/WebObjects/Versions/
8 8  
9 -Create: {{code language="none"}}/Developer/WebObjects/Versions/{{/code}}
10 -
11 11  ==== Download WOInstaller.jar ====
12 12  
13 -[[image:attach:media_1245677004032.png]]
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 14  
15 -We now need to download the {{code language="none"}}WOInstaller.jar{{/code}} file from [[http:~~/~~/wocommunity.org/documents/tools/WOInstaller.jar>>url:http://wocommunity.org/documents/tools/WOInstaller.jar||shape="rect"]]{{code language="none"}}{{/code}} and save it into the {{code language="none"}}Versions/{{/code}} directory we just created.
16 -
17 17  ==== Use WOInstaller.jar to download WebObjects ====
18 18  
19 -[[image:attach:media_1245678323686.png]]
20 -
17 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245678323686.png?version=10||align="centre"]]
21 21  Open Terminal.app and run one of the following commands:
22 22  
23 -{{noformat}}
24 -java -jar /Developer/WebObjects/Versions/WOInstaller.jar 5.3.3 /Developer/WebObjects/Versions/WebObjects533
25 -java -jar /Developer/WebObjects/Versions/WOInstaller.jar 5.4.3 /Developer/WebObjects/Versions/WebObjects543
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
26 26  
27 -{{/noformat}}
23 +Depending upon which version of WO you would like to download.
28 28  
29 -(depending upon which version of WebObjects you would like to download.)
30 -
31 31  ==== Installed Versions ====
32 32  
33 -[[image:attach:media_1245679408792.png]]
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.
34 34  
35 -When the script has finished 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.
36 -
37 37  ==== Open Eclipse / WOLips ====
38 38  
39 -[[image:attach:media_1245679819648.png]]
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.,,
40 40  
41 -You need to launch Eclipse and WOLips at least once so that it will create the default {{code language="none"}}wolips.properties{{/code}} file in {{code language="none"}}~/Library/Application Support/WOLips/{{/code}}. If you've already been using WOlips, you can skip this step.
35 +==== Copy the default wolips.properties file ====
42 42  
43 -{{note title="Note"}}
44 -Feb 12, 2010: At least with WOLips 3.4.5830, launching Eclipse/WOLips is not sufficient to get it to create the default {{code language="none"}}wolips.properties{{/code}}. You need to create a project; a new WebObjects Application project will do nicely.
45 -{{/note}}
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.
46 46  
47 -==== Make a copy of the default {{code language="none"}}wolips.properties{{/code}} file ====
40 +==== Modify your new wolips.properties file to point to your newly downloaded version of WebObjects ====
48 48  
49 -[[image:attach:media_1245680007266.png]]
50 -Select the {{code language="none"}}wolips.properties{{/code}} file and make a copy of it. Then rename the copy to be {{code language="none"}}wolips.yourversion.properties{{/code}}. In reality, you can rename it however you'd like (for example: {{code language="none"}}wolips.properties.533{{/code}} or {{code language="none"}}533.wolips.properties{{/code}}), but I find that putting the version number in the middle (e.g. {{code language="none"}}wolips.533.properties{{/code}}) will keep all the different versions together, and will not mess with the extension mapping.
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:
51 51  
52 -==== Modify your new {{code language="none"}}wolips.533.properties{{/code}} file to point to your newly downloaded version of WebObjects ====
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
53 53  
54 -As an example, if you downloaded WebObjects 5.3.3 into {{code language="none"}}/Developer/WebObjects/Versions/WebObjects533{{/code}}, then modify your new {{code language="none"}}wolips.533.properties{{/code}} file as follows (substituting your username for {{code language="none"}}bubba{{/code}}, of course):
53 +==== Set the Eclipse Workspace to use the newly Installed Version of WebObjects ====
55 55  
56 -{{noformat}}
57 -wo.network.root=/Network
58 -wo.system.root=/Developer/WebObjects/Versions/WebObjects533/System
59 -wo.local.root=/Developer/WebObjects/Versions/WebObjects533
60 -wo.user.root=/Users/bubba
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.
61 61  
62 -wo.network.frameworks=/Network/Library/Frameworks
63 -wo.system.frameworks=/Developer/WebObjects/Versions/WebObjects533/System/Library/Frameworks
64 -wo.local.frameworks=/Developer/WebObjects/Versions/WebObjects533/Library/Frameworks
65 -wo.user.frameworks=/Users/bubba/Library/Frameworks
58 +==== OPTIONAL - Setup Eclipse's Ant Builder to use the newly Installed Version of WebObjects ====
66 66  
67 -wo.bootstrapjar=/Developer/WebObjects/Versions/WebObjects533/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
68 -wo.extensions=/Developer/WebObjects/Versions/WebObjects533/Library/WebObjects/Extensions
69 -wo.apps.root=/Developer/WebObjects/Versions/WebObjects533/Library/WebObjects/Applications
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.
70 70  
71 -wo.api.root=/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.WebObjectsReference.docset/Contents/Resources/\
72 -Documents/documentation/InternetWeb/Reference/WO542Reference
73 -
74 -{{/noformat}}
75 -
76 -==== Configure Eclipse to use your newly installed version of WebObjects ====
77 -
78 -Eclipse needs to be able to reference your {{code language="none"}}wolips.533.properties{{/code}} file, so that it can locate all the resources needed in order to build and to run your projects.
79 -
80 -Here you have two options:
81 -
82 -* you can set a workspace-wide preference to use a particular {{code language="none"}}wolips.properties{{/code}} file
83 -* you can configure an individual project to use a particular {{code language="none"}}wolips.properties{{/code}} file
84 -
85 -Neither approach is without its problems. Read on...
86 -
87 -===== Option 1 - Configure the Eclipse workspace to reference your new {{code language="none"}}wolips.properties{{/code}} file =====
88 -
89 -[[image:attach:media_1245680796194.png]]
90 -
91 -With this option, we're telling the Eclipse/WOLips internal incremental builder to reference a specific {{code language="none"}}wolips.properties{{/code}} file for the entire workspace (rather than using the default, which is {{code language="none"}}$HOME/Library/Application Support/WOLips/wolips.properties{{/code}}). And by doing this, we're implicitly telling Eclipse which installation of WebObjects we want it to use.
92 -
93 -To change this setting, go to the "Eclipse" menu, select "Preferences", open the "WOLips" preference group, then select "Build". Enter the name of your new {{code language="none"}}wolips.properties{{/code}} file. Note that this can be either an absolute or relative filename. Relative filenames are relative to your {{code language="none"}}$HOME/Library/Application Support/WOLips/{{/code}} directory.
94 -
95 -Although in some cases you can get WOLips to use your new {{code language="none"}}wolips.properties{{/code}} via a Clean/Rebuild, or by closing/reopening your project, it's probably wise to just restart Eclipse, to make sure the change is "refreshed" for all your open projects. And then a Clean/Rebuild may also be in order.
96 -
97 -Eclipse/WOLips will also use this setting to find the referenced resources at runtime, i.e. when your run your project from within Eclipse.
98 -
99 -{{note title="Note"}}
100 -This setting currently affects only the Eclipse //internal// builder - it will not influence external builds with Ant. That is, when you build your project (e.g. for deployment) using any of the following:
101 -
102 -(% class="alternate" %)
103 -* Ctrl-click {{code language="none"}}build.xml{{/code}} -> Run As -> Ant Build
104 -* WOLips Ant Tools -> Install
105 -* build with Ant from the command line
106 -
107 -...this setting will not affect where Ant looks for the various resources specified by the settings in your alternate {{code language="none"}}wolips.properties{{/code}}.
108 -
109 -In order to configure Ant so that it can find your {{code language="none"}}wolips.properties{{/code}}-specified resources, you'll need to use Option 2, below.
110 -{{/note}}
111 -
112 -===== Option 2 - Configure your project to reference your new {{code language="none"}}wolips.properties{{/code}} file =====
113 -
114 -[[image:attach:build.properties.png]]
115 -
116 -Currently, the Eclipse Ant builder is not controlled by the "WOLips -> Build" setting in Eclipse's Preferences. In order to build with Ant, you first need to tell Ant where to find your WebObjects installation and other resources. Your project's default Ant buildfile, {{code language="none"}}build.xml{{/code}} (which is created by WOLips when you create a new WebObjects application project), reads and uses the properties found in your {{code language="none"}}$HOME/Library/Application Support/WOLips/wolips.properties{{/code}} file. But you can specify a different {{code language="none"}}wolips.properties{{/code}} file by adding a line like the following to your project's {{code language="none"}}build.properties{{/code}} file:
117 -
118 -{{noformat}}
119 -wolips.properties=/Users/bubba/Library/Application Support/WOLips/wolips.533.properties
120 -
121 -{{/noformat}}
122 -
123 -{{note}}
124 -Note that for now (as of WOLips version 3.4.5830), this really must be an absolute, fully-qualified filepath; if you were to specify a relative filename, Eclipse/WOLips would treat it as being relative to {{code language="none"}}$HOME/Library/Application Support/WOLips{{/code}}, but Ant (using the default {{code language="none"}}build.xml{{/code}}) would treat it as being relative to your project's base folder.
125 -
126 -Also, you might think you could use an Ant variable specification such as ${user.home} on the right hand side – but you can't. The problem is that while Ant would interpret this correctly, Eclipse/WOLips will not. Also note that you can't in any case use a tilde character as an abbreviation for your home directory.
127 -{{/note}}
128 -
129 -If you specify a {{code language="none"}}wolips.properties{{/code}} setting this way, it will override the workspace-wide WOLips preference setting.
130 -
131 -Eclipse will also use this setting to find resources at runtime, i.e. when you run your project from within Eclipse.
132 -
133 133  ==== OPTIONAL - Building your project from the Command Line Using Ant ====
134 134  
135 -If you want to build your project with Ant from the command line, you need to tell Ant two things:
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}}
136 136  
137 -===== (1) The location of the WOLips {{code language="none"}}woproject.jar{{/code}} file: =====
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}}
138 138  
139 -You can do this either via the {{code language="none"}}-lib{{/code}} parameter to the {{code language="none"}}ant{{/code}} command, e.g.
73 +==== OPTIONAL - Building your project using Hudson ====
140 140  
141 -{{noformat}}
142 -ant -lib /path/to/woproject.jar
143 -
144 -{{/noformat}}
145 -
146 -or by putting a copy of {{code language="none"}}woproject.jar{{/code}} someplace where Ant will find it. A convenient location for it is your {{code language="none"}}$HOME/.ant/lib{{/code}} folder:
147 -
148 -{{noformat}}
149 -mkdir -p ~/.ant/lib
150 -cp -p /Applications/eclipse-3.4.2/plugins/org.objectstyle.wolips.woproject.ant_3.4.5830/lib/woproject.jar ~/.ant/lib
151 -
152 -{{/noformat}}
153 -
154 -===== (2) The location of your {{code language="none"}}wolips.properties{{/code}} file: =====
155 -
156 -If you already specified this in your {{code language="none"}}build.properties{{/code}} (as per Option 2, above), then you're done. But perhaps you have no interest in building with Ant from within Eclipse, but only want to be able to do Ant builds from the command line. If that's the case, then you can use Ant's {{code language="none"}}-D<property>=<value>{{/code}} command line option to set the value of the {{code language="none"}}wolips.properties{{/code}} Ant property to be the path to your {{code language="none"}}wolips.properties{{/code}} file. Ant will read and process the file specified by the {{code language="none"}}wolips.properties{{/code}} property during the course of processing your {{code language="none"}}build.xml{{/code}}. Again, this path specification can be absolute or relative; but if it's relative, Ant will interpret it as being relative to your project's base folder.
157 -
158 -Example:
159 -
160 -{{noformat}}
161 -$ ant -Dwolips.properties=/Users/bubba/Library/Application\ Support/WOLips/wolips.533.properties clean build
162 -{{/noformat}}
163 -
164 -As above, you cannot use a tilde character as an abbreviation for your home directory (but you in fact //could// use an environment variable such as {{code language="none"}}$HOME{{/code}} - the shell would expand it before passing it to ant).
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}}