Wiki source code of Getting started

Version 27.1 by Maik Musall on 2021/06/16 09:17

Show last authors
1 == Foreword ==
2
3 Since the rest of this page is old (2010), please consult Hugis gists:
4
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
9 == Introduction ==
10
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 .
12
13 == Outline ==
14
15
16
17 {{toc indent="20px" style="disc"/}}
18
19 == Install Maven ==
20
21 You can download and install maven for most platforms [[here>>url:http://maven.apache.org/download||shape="rect"]].
22
23 {{tip title="Mac Tip"}}
24 install macports [[http:~~/~~/www.macports.org/install.php>>url:http://www.macports.org/install.php||shape="rect"]], then on the terminal
25
26 (% class="auto-cursor-target" %)
27 \\
28
29 {{noformat}}
30 sudo port install maven2
31 {{/noformat}}
32
33 (% class="auto-cursor-target" %)
34 \\
35
36 In future, to keep this up to date:
37
38 (% class="auto-cursor-target" %)
39 \\
40
41 {{noformat}}
42 sudo port upgrade maven2
43 {{/noformat}}
44
45 (% class="auto-cursor-target" %)
46 \\
47 {{/tip}}
48
49 == Download Eclipse ==
50
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.
52
53 {{tip title="Which one do I choose?"}}
54 Eclipse Classic (161MB) is a popular choice among WO developers.
55 However, the more lightweight Eclipse IDE for Java Developers (91MB) should work.
56 {{/tip}}
57
58 == Launch Eclipse ==
59
60 Open eclipse by double clicking on the application icon (from where you installed it).
61 [[image:attach:LaunchEclipse.png]]
62
63 Eclipse will then ask you for the location of a 'workspace' which is where eclipse will store its metadata.
64 [[image:attach:LaunchEclipseWorkspace.png]]
65
66 == Install Eclipse plugins ==
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
72 [[image:attach:install_menu.png]]
73
74 This will open the install window:
75 [[image:attach:install_window.png]]
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
81 [[image:attach:addsite_testng.png]]
82
83 ===== b) Tick the plugin fragments to install =====
84
85 [[image:attach:fragments_testng.png]]
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
91 [[image:attach:install_restart.png]]
92
93 ===== e) after eclipse has restarted, continue... =====
94
95 ==== Step 3 - install Groovy ====
96
97 Repeat step 2 with the following detail changes:
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"]]
100
101 ==== Step 4 - Install subversive connectors ====
102
103 Repeat step 2 with the following detail changes:
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)'
107
108 [[image:attach:fragments_subversive.png]]
109
110 ===== Step 5 - Install egit =====
111
112 Repeat step 2 with the following detail changes:
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"]]
115
116 ===== Step 6 - Install m2eclipse =====
117
118 Repeat step 2 with the following detail changes:
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)"
122 [[image:attach:fragments_m2e_lmg.png]]
123
124 ===== Step 6 - Install WOLips =====
125
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
128 Repeat step 2 with the following detail changes:
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
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!
169 And I prefer to kill the console buffer manually rather than lose messages that might be important.
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.
194 e.g.,
195 When connecting to a local database I use the local files listed below during launch:
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.