Wiki source code of Getting started

Last modified by Maik Musall on 2021/06/16 09:17

Hide last authors
Maik Musall 26.1 1 == Foreword ==
2
Maik Musall 27.1 3 Since the rest of this page is old (2010), please consult Hugis gists:
Maik Musall 26.1 4
Maik Musall 27.1 5 (% style="list-style-type: square;" %)
6 * [[Creating a new WO Maven project>>url:https://gist.github.com/hugith/d2ba6da9e4942f4ece95d7a721159cd1||shape="rect"]]
7 * [[Converting a Fluffy Bunny project to Maven>>url:https://gist.github.com/hugith/3c269a3196d0c4f2da486f1109c16d42||shape="rect"]]
8
Larry Mills-Gahl 24.1 9 == Introduction ==
Larry Mills-Gahl 7.1 10
Larry Mills-Gahl 24.1 11 This guide is aimed at those who'd like to set up a local wolips development environment. This guide is mainly targeted towards maven users of WOLips, however much of guide is useful, whether you use maven or ant, so far as installation instructions for eclipse plugins. At least, these are the steps that I (ldeck) travel through and it is essentially a brain-dump to save me from future maintenance work .
Larry Mills-Gahl 7.1 12
Larry Mills-Gahl 24.1 13 == Outline ==
Lachlan Deck 14.1 14
Maik Musall 26.1 15
16
Larry Mills-Gahl 25.1 17 {{toc indent="20px" style="disc"/}}
Lachlan Deck 14.1 18
Larry Mills-Gahl 7.1 19 == Install Maven ==
20
Larry Mills-Gahl 24.1 21 You can download and install maven for most platforms [[here>>url:http://maven.apache.org/download||shape="rect"]].
Larry Mills-Gahl 7.1 22
23 {{tip title="Mac Tip"}}
Larry Mills-Gahl 24.1 24 install macports [[http:~~/~~/www.macports.org/install.php>>url:http://www.macports.org/install.php||shape="rect"]], then on the terminal
Larry Mills-Gahl 7.1 25
Maik Musall 26.1 26 (% class="auto-cursor-target" %)
27 \\
28
Larry Mills-Gahl 24.1 29 {{noformat}}
30 sudo port install maven2
31 {{/noformat}}
Larry Mills-Gahl 7.1 32
Maik Musall 26.1 33 (% class="auto-cursor-target" %)
34 \\
35
Larry Mills-Gahl 24.1 36 In future, to keep this up to date:
Larry Mills-Gahl 7.1 37
Maik Musall 26.1 38 (% class="auto-cursor-target" %)
39 \\
40
Larry Mills-Gahl 24.1 41 {{noformat}}
42 sudo port upgrade maven2
43 {{/noformat}}
Maik Musall 26.1 44
45 (% class="auto-cursor-target" %)
46 \\
Larry Mills-Gahl 7.1 47 {{/tip}}
48
49 == Download Eclipse ==
50
Larry Mills-Gahl 24.1 51 Eclipse can be downloaded and installed from [[www.eclipse.org/downloads/>>url:http://www.eclipse.org/downloads/||shape="rect"]]. For mac it's just a simple matter of unpacking the zip file downloaded into /Applications or /Users/youraccount/Applications.
Larry Mills-Gahl 7.1 52
53 {{tip title="Which one do I choose?"}}
Larry Mills-Gahl 24.1 54 Eclipse Classic (161MB) is a popular choice among WO developers.
Maik Musall 26.1 55 However, the more lightweight Eclipse IDE for Java Developers (91MB) should work.
Larry Mills-Gahl 7.1 56 {{/tip}}
57
58 == Launch Eclipse ==
59
60 Open eclipse by double clicking on the application icon (from where you installed it).
Larry Mills-Gahl 24.1 61 [[image:attach:LaunchEclipse.png]]
Larry Mills-Gahl 7.1 62
63 Eclipse will then ask you for the location of a 'workspace' which is where eclipse will store its metadata.
Larry Mills-Gahl 24.1 64 [[image:attach:LaunchEclipseWorkspace.png]]
Larry Mills-Gahl 7.1 65
Larry Mills-Gahl 24.1 66 == Install Eclipse plugins ==
Larry Mills-Gahl 7.1 67
68 Various plugins have prerequisites, and some are just useful anyway, so here's a suggested order of installing some useful plugins when setting up a brand new eclipse environment.
69
70 ==== Step 1 - Choose the menu item: Help > install new software... ====
71
Larry Mills-Gahl 24.1 72 [[image:attach:install_menu.png]]
Larry Mills-Gahl 7.1 73
74 This will open the install window:
Larry Mills-Gahl 24.1 75 [[image:attach:install_window.png]]
Larry Mills-Gahl 7.1 76
77 ==== Step 2 - install the testNG plugin (for a simple example) ====
78
79 ===== a) Click the "Add..." button to define the update site, fill in the details, click OK. =====
80
Larry Mills-Gahl 24.1 81 [[image:attach:addsite_testng.png]]
Larry Mills-Gahl 7.1 82
83 ===== b) Tick the plugin fragments to install =====
84
Larry Mills-Gahl 24.1 85 [[image:attach:fragments_testng.png]]
Larry Mills-Gahl 7.1 86
87 ===== c) Click next repeatedly, confirming license agreements, finally clicking "Finish" to install. =====
88
89 ===== d) after the software plugin has installed, it will prompt you for a restart of eclipse. Click Yes. =====
90
Larry Mills-Gahl 24.1 91 [[image:attach:install_restart.png]]
Larry Mills-Gahl 7.1 92
93 ===== e) after eclipse has restarted, continue... =====
94
95 ==== Step 3 - install Groovy ====
96
97 Repeat step 2 with the following detail changes:
Maik Musall 26.1 98 Site name: Groovy-dev
99 Site location: [[http:~~/~~/dist.codehaus.org/groovy/distributions/updateDev/>>url:http://dist.codehaus.org/groovy/distributions/updateDev/||rel="nofollow" shape="rect" class="external-link"]]
Larry Mills-Gahl 7.1 100
101 ==== Step 4 - Install subversive connectors ====
102
103 Repeat step 2 with the following detail changes:
Maik Musall 26.1 104 Site name: Subversive-connectors
105 Site location: [[http:~~/~~/community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site/>>url:http://community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site/||rel="nofollow" shape="rect" class="external-link"]]
106 Fragments selected: 'Subversive SVN Connectors', 'SVNKit 1.3 Implementation (Optional)'
Larry Mills-Gahl 7.1 107
Larry Mills-Gahl 24.1 108 [[image:attach:fragments_subversive.png]]
Larry Mills-Gahl 7.1 109
Larry Mills-Gahl 24.1 110 ===== Step 5 - Install egit =====
Larry Mills-Gahl 7.1 111
112 Repeat step 2 with the following detail changes:
Maik Musall 26.1 113 Site name: egit
114 Site location: [[http:~~/~~/www.jgit.org/updates>>url:http://www.jgit.org/updates||rel="nofollow" shape="rect" class="external-link"]]
Larry Mills-Gahl 7.1 115
116 ===== Step 6 - Install m2eclipse =====
117
118 Repeat step 2 with the following detail changes:
Maik Musall 26.1 119 Site name: m2eclipse
120 Site location: [[http:~~/~~/m2eclipse.sonatype.org/sites/m2e>>url:http://m2eclipse.sonatype.org/sites/m2e||rel="nofollow" shape="rect" class="external-link"]]
121 Fragments selected: "Maven Integration for Eclipse (Required)"
Larry Mills-Gahl 24.1 122 [[image:attach:fragments_m2e_lmg.png]]
Larry Mills-Gahl 7.1 123
Larry Mills-Gahl 24.1 124 ===== Step 6 - Install WOLips =====
Larry Mills-Gahl 7.1 125
Larry Mills-Gahl 24.1 126 Choose an update site that's appropriate for the version of Eclipse you're running. The update site for Eclipse 3.5 is as follows. (Ask on the mailing list for future versions if it's not been updated here).
127
Larry Mills-Gahl 7.1 128 Repeat step 2 with the following detail changes:
Maik Musall 26.1 129 Site name: WOLips_3_5
130 Site location: [[http:~~/~~/webobjects.mdimension.com/wolips/eclipse_3_5/>>url:http://webobjects.mdimension.com/wolips/eclipse_3_5/||rel="nofollow" shape="rect" class="external-link"]]
131 Fragments selected: all "Standard Install" components
Larry Mills-Gahl 24.1 132 [[image:attach:fragments_wolips.png]]
133
134 ===== Step 7 - Other plugins =====
135
136 Oh, sure I also install jadclipse ([[http:~~/~~/jadclipse.sf.net/update>>url:http://jadclipse.sf.net/update||rel="nofollow" shape="rect" class="external-link"]]) for keeping in touch with things but that's beyond the scope of this guide.
137
138 == Configuring Eclipse ==
139
140 ==== wolips binding validation ====
141
142 [[image:attach:wolips_bindingsvalidation.png]]
143
144 ==== wolips spaces around html tags ====
145
146 [[image:attach:wolips_nospaces.png]]
147
148 ==== wolips launching ====
149
150 As of this writing, wolips has forgotten to set the key "-WOHost" with value "localhost". Add it.
151 I also untick a few things that don't need to be specifically ticked so that your project's properties are used (as you're mimicking the deployment env locally)
152 [[image:attach:wolips_launching.png]]
153
154 ==== Set the default jvm ====
155
156 [[image:attach:prefs_jvm.png]]
157
158 ==== Java typing prefs ====
159
160 [[image:attach:prefs_java_typing.png]]
161
162 ==== Java Templates prefs ====
163
164 [[image:attach:prefs_java_templates.png]]
165
166 ==== Run / Debug prefs ====
167
168 I'll have 4 spaces per tab rather than 8 thanks!
Maik Musall 26.1 169 And I prefer to kill the console buffer manually rather than lose messages that might be important.
Larry Mills-Gahl 24.1 170 [[image:attach:prefs_console.png]]
171
172 ==== Launch configurations ====
173
174 I don't like them disappearing on me when I close / delete projects
175 [[image:attach:prefs_launchconfig.png]]
176
177 ==== Lines numbers please ====
178
179 [[image:attach:prefs_linenumbers.png]]
180
181 ==== UTF-8 Thanks ====
182
183 [[image:attach:prefs_utf8.png]]
184
185 == Creating a project ==
186
187 TODO
188
189 == Launching your project ==
190
191 ==== Configure eomodel connection dictionaries, log4j, additional properties ====
192
193 In my application projects I create an additional folder called 'Properties' which contains additional property files for differing launches.
Maik Musall 26.1 194 e.g.,
195 When connecting to a local database I use the local files listed below during launch:
Larry Mills-Gahl 24.1 196
197 {{noformat}}
198
199 jdbc.local.properties
200 log4j.local.properties
201 runtime.local.properties
202 ...
203 jdbc.test.properties
204 log4j.test.properties
205 runtime.test.properties
206
207 {{/noformat}}
208
209 To achieve this switching easily I define in the launch configuration for the application the following two additional properties (from those defined globally in WOLips prefs)
210
211 * key: -runtime.config.dir value:"../../Properties"
212 * key: -runtime.config.name value:".local"
213
214 And in my application's Properties file I have the following properties declared
215
216 {{noformat}}
217
218 runtime.config.dir=Properties
219 runtime.config.name=
220
221 er.extensions.ERXProperties.OptionalConfigurationFiles=(\
222 @@runtime.config.dir@@/log4j@@runtime.config.name@@.properties,\
223 @@runtime.config.dir@@/jdbc@@runtime.config.name@@.properties,\
224 @@runtime.config.dir@@/runtime@@runtime.config.name@@.properties\
225 )
226
227 {{/noformat}}
228
229 Naturally, within the jdbc property files are the relevant project wonder properties for configuring the eomodels connection dictionaries, withing the lo4j files are the relevant config for log4j, and runtime properties is available for any special configuration for that particular environment.