Changes for page Using WOLips With Multiple Versions of WebObjects
Last modified by D Tim Cummings on 2022/07/27 02:24
From version 70.1
edited by David Avendasora
on 2011/06/13 01:30
on 2011/06/13 01:30
Change comment:
Migrated to Confluence 4.0
To version 67.1
edited by David Avendasora
on 2011/06/13 01:30
on 2011/06/13 01:30
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,21 +2,21 @@ 2 2 3 3 ==== Create New Directory Structure ==== 4 4 5 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245674441767.png?version=10]]5 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245674441767.png?version=10||align="centre"]] 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.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 ##/Developer## directory. 8 8 9 -Create: {{code language="none"}}/Developer/WebObjects/Versions/{{/code}}9 +Create: ##/Developer/WebObjects/Versions/## 10 10 11 11 ==== Download WOInstaller.jar ==== 12 12 13 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245677004032.png?version=10]]13 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245677004032.png?version=10||align="centre"]] 14 14 15 -We now need to download the {{code language="none"}}WOInstaller.jar{{/code}}file from [[http:~~/~~/webobjects.mdimension.com/wolips/>>url:http://webobjects.mdimension.com/wolips/||shape="rect"]]{{codelanguage="none"}}{{/code}}andsave it into the{{code language="none"}}Versions/{{/code}}directory we just created.15 +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. 16 16 17 17 ==== Use WOInstaller.jar to download WebObjects ==== 18 18 19 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245678323686.png?version=10]]19 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245678323686.png?version=10||align="centre"]] 20 20 21 21 Open Terminal.app and run one of the following commands: 22 22 ... ... @@ -31,28 +31,30 @@ 31 31 32 32 ==== Installed Versions ==== 33 33 34 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679408792.png?version=10]]34 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679408792.png?version=10||align="centre"]] 35 35 36 36 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. 37 37 38 38 ==== Open Eclipse / WOLips ==== 39 39 40 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679819648.png?version=10]]40 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245679819648.png?version=10||align="centre"]] 41 41 42 -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.42 +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. 43 43 44 44 {{note title="Note"}} 45 -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 + 46 +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. 47 + 46 46 {{/note}} 47 47 48 -==== Make a copy of the default {{code language="none"}}wolips.properties{{/code}}file ====50 +==== Make a copy of the default ##wolips.properties## file ==== 49 49 50 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680007266.png?version=10]]51 -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.52 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680007266.png?version=10||align="centre"]] 53 +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## or ##533.wolips.properties##), but I find that putting the version number in the middle (e.g. ##wolips.533.properties##) will keep all the different versions together, and will not mess with the extension mapping. 52 52 53 -==== Modify your new {{code language="none"}}wolips.533.properties{{/code}}file to point to your newly downloaded version of WebObjects ====55 +==== Modify your new ##wolips.533.properties## file to point to your newly downloaded version of WebObjects ==== 54 54 55 -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):57 +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): 56 56 57 57 {{noformat}} 58 58 ... ... @@ -77,45 +77,45 @@ 77 77 78 78 ==== Configure Eclipse to use your newly installed version of WebObjects ==== 79 79 80 -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.82 +Eclipse needs to be able to reference your ##wolips.533.properties## file, so that it can locate all the resources needed in order to build and to run your projects. 81 81 82 82 Here you have two options: 83 83 84 -* you can set a workspace-wide preference to use a particular {{code language="none"}}wolips.properties{{/code}}file85 -* you can configure an individual project to use a particular {{code language="none"}}wolips.properties{{/code}}file86 +* you can set a workspace-wide preference to use a particular ##wolips.properties## file 87 +* you can configure an individual project to use a particular ##wolips.properties## file 86 86 87 -Neither approach is without its problems. Read on... 89 +Neither approach is without its problems. Read on... 88 88 89 -===== Option 1 - Configure the Eclipse workspace to reference your new {{code language="none"}}wolips.properties{{/code}}file =====91 +===== Option 1 - Configure the Eclipse workspace to reference your new ##wolips.properties## file ===== 90 90 91 -[[image: url:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680796194.png?version=10]]93 +[[image:http://wiki.objectstyle.org/confluence/download/attachments/5275708/media_1245680796194.png?version=10||align="centre"]] 92 92 93 -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.95 +With this option, we're telling the Eclipse/WOLips internal incremental builder to reference a specific ##wolips.properties## file for the entire workspace (rather than using the default, which is ##$HOME/Library/Application Support/WOLips/wolips.properties##). And by doing this, we're implicitly telling Eclipse which installation of WebObjects we want it to use. 94 94 95 -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.97 +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 ##wolips.properties## file. Note that this can be either an absolute or relative filename. Relative filenames are relative to your ##$HOME/Library/Application Support/WOLips/## directory. 96 96 97 -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.99 +Although in some cases you can get WOLips to use your new ##wolips.properties## 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. 98 98 99 99 Eclipse/WOLips will also use this setting to find the referenced resources at runtime, i.e. when your run your project from within Eclipse. 100 100 101 101 {{note title="Note"}} 102 -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: 103 103 104 - (%class="alternate"%)105 - *Ctrl-click {{code language="none"}}build.xml{{/code}} -> Run As -> Ant Build106 - *WOLips Ant Tools -> Install107 - *build with Ant from the command line105 +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: 106 +- Ctrl-click {{build.xml}} \-> Run As \-> Ant Build 107 +- WOLips Ant Tools \-> Install 108 +- build with Ant from the command line 108 108 109 -...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}}.110 +...this setting will not affect where Ant looks for the various resources specified by the settings in your alternate {{wolips.properties}}. 110 110 111 -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. 112 +In order to configure Ant so that it can find your {{wolips.properties}}\-specified resources, you'll need to use Option 2, below. 113 + 112 112 {{/note}} 113 113 114 -===== Option 2 - Configure your project to reference your new {{code language="none"}}wolips.properties{{/code}}file =====116 +===== Option 2 - Configure your project to reference your new ##wolips.properties## file ===== 115 115 116 -[[image: attach:build.properties.png]]118 +[[image:build.properties.png||align="centre"]] 117 117 118 -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:120 +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, ##build.xml## (which is created by WOLips when you create a new WebObjects application project), reads and uses the properties found in your ##$HOME/Library/Application Support/WOLips/wolips.properties## file. But you can specify a different ##wolips.properties## file by adding a line like the following to your project's ##build.properties## file: 119 119 120 120 {{noformat}} 121 121 ... ... @@ -124,12 +124,14 @@ 124 124 {{/noformat}} 125 125 126 126 {{note}} 127 -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. 128 128 129 -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. 130 +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 {{$HOME/Library/Application Support/WOLips}}, but Ant (using the default {{build.xml}}) would treat it as being relative to your project's base folder. 131 + 132 +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. 133 + 130 130 {{/note}} 131 131 132 -If you specify a {{code language="none"}}wolips.properties{{/code}}setting this way, it will override the workspace-wide WOLips preference setting.136 +If you specify a ##wolips.properties## setting this way, it will override the workspace-wide WOLips preference setting. 133 133 134 134 Eclipse will also use this setting to find resources at runtime, i.e. when you run your project from within Eclipse. 135 135 ... ... @@ -137,9 +137,9 @@ 137 137 138 138 If you want to build your project with Ant from the command line, you need to tell Ant two things: 139 139 140 -===== (1) The location of the WOLips {{code language="none"}}woproject.jar{{/code}}file: =====144 +===== (1) The location of the WOLips ##woproject.jar## file: ===== 141 141 142 -You can do this either via the {{codelanguage="none"}}-lib{{/code}}parameter to the{{code language="none"}}ant{{/code}}command, e.g.146 +You can do this either via the ##lib## parameter to the ##ant## command, e.g. 143 143 144 144 {{noformat}} 145 145 ... ... @@ -147,7 +147,7 @@ 147 147 148 148 {{/noformat}} 149 149 150 -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:154 +or by putting a copy of ##woproject.jar## someplace where Ant will find it. A convenient location for it is your ##$HOME/.ant/lib## folder: 151 151 152 152 {{noformat}} 153 153 ... ... @@ -156,9 +156,9 @@ 156 156 157 157 {{/noformat}} 158 158 159 -===== (2) The location of your {{code language="none"}}wolips.properties{{/code}}file: =====163 +===== (2) The location of your ##wolips.properties## file: ===== 160 160 161 -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.165 +If you already specified this in your ##build.properties## (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 ##D<property>=<value>## command line option to set the value of the ##wolips.properties## Ant property to be the path to your ##wolips.properties## file. Ant will read and process the file specified by the ##wolips.properties## property during the course of processing your ##build.xml##. 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. 162 162 163 163 Example: 164 164 ... ... @@ -166,4 +166,4 @@ 166 166 $ ant -Dwolips.properties=/Users/bubba/Library/Application\ Support/WOLips/wolips.533.properties clean build 167 167 {{/noformat}} 168 168 169 -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).173 +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 ##$HOME## the shell would expand it before passing it to ant).