Wiki source code of Getting started

Version 25.1 by Larry Mills-Gahl on 2010/02/19 18:26

Hide last authors
Larry Mills-Gahl 24.1 1 == Introduction ==
Larry Mills-Gahl 7.1 2
Larry Mills-Gahl 24.1 3 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 4
Larry Mills-Gahl 24.1 5 == Outline ==
Lachlan Deck 14.1 6
Larry Mills-Gahl 25.1 7 {{toc indent="20px" style="disc"/}}
Lachlan Deck 14.1 8
Larry Mills-Gahl 7.1 9 == Install Maven ==
10
Larry Mills-Gahl 24.1 11 You can download and install maven for most platforms [[here>>url:http://maven.apache.org/download||shape="rect"]].
Larry Mills-Gahl 7.1 12
13 {{tip title="Mac Tip"}}
Larry Mills-Gahl 24.1 14 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 15
Larry Mills-Gahl 24.1 16 {{noformat}}
17 sudo port install maven2
18 {{/noformat}}
Larry Mills-Gahl 7.1 19
Larry Mills-Gahl 24.1 20 In future, to keep this up to date:
Larry Mills-Gahl 7.1 21
Larry Mills-Gahl 24.1 22 {{noformat}}
23 sudo port upgrade maven2
24 {{/noformat}}
Larry Mills-Gahl 7.1 25 {{/tip}}
26
27 == Download Eclipse ==
28
Larry Mills-Gahl 24.1 29 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 30
31 {{tip title="Which one do I choose?"}}
Larry Mills-Gahl 24.1 32 Eclipse Classic (161MB) is a popular choice among WO developers.
33 However, the more lightweight Eclipse IDE for Java Developers (91MB) should work.
Larry Mills-Gahl 7.1 34 {{/tip}}
35
36 == Launch Eclipse ==
37
38 Open eclipse by double clicking on the application icon (from where you installed it).
Larry Mills-Gahl 24.1 39 [[image:attach:LaunchEclipse.png]]
Larry Mills-Gahl 7.1 40
41 Eclipse will then ask you for the location of a 'workspace' which is where eclipse will store its metadata.
Larry Mills-Gahl 24.1 42 [[image:attach:LaunchEclipseWorkspace.png]]
Larry Mills-Gahl 7.1 43
Larry Mills-Gahl 24.1 44 == Install Eclipse plugins ==
Larry Mills-Gahl 7.1 45
46 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.
47
48 ==== Step 1 - Choose the menu item: Help > install new software... ====
49
Larry Mills-Gahl 24.1 50 [[image:attach:install_menu.png]]
Larry Mills-Gahl 7.1 51
52 This will open the install window:
Larry Mills-Gahl 24.1 53 [[image:attach:install_window.png]]
Larry Mills-Gahl 7.1 54
55 ==== Step 2 - install the testNG plugin (for a simple example) ====
56
57 ===== a) Click the "Add..." button to define the update site, fill in the details, click OK. =====
58
Larry Mills-Gahl 24.1 59 [[image:attach:addsite_testng.png]]
Larry Mills-Gahl 7.1 60
61 ===== b) Tick the plugin fragments to install =====
62
Larry Mills-Gahl 24.1 63 [[image:attach:fragments_testng.png]]
Larry Mills-Gahl 7.1 64
65 ===== c) Click next repeatedly, confirming license agreements, finally clicking "Finish" to install. =====
66
67 ===== d) after the software plugin has installed, it will prompt you for a restart of eclipse. Click Yes. =====
68
Larry Mills-Gahl 24.1 69 [[image:attach:install_restart.png]]
Larry Mills-Gahl 7.1 70
71 ===== e) after eclipse has restarted, continue... =====
72
73 ==== Step 3 - install Groovy ====
74
75 Repeat step 2 with the following detail changes:
Larry Mills-Gahl 24.1 76 Site name: Groovy-dev
77 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 78
79 ==== Step 4 - Install subversive connectors ====
80
81 Repeat step 2 with the following detail changes:
Larry Mills-Gahl 24.1 82 Site name: Subversive-connectors
83 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"]]
84 Fragments selected: 'Subversive SVN Connectors', 'SVNKit 1.3 Implementation (Optional)'
Larry Mills-Gahl 7.1 85
Larry Mills-Gahl 24.1 86 [[image:attach:fragments_subversive.png]]
Larry Mills-Gahl 7.1 87
Larry Mills-Gahl 24.1 88 ===== Step 5 - Install egit =====
Larry Mills-Gahl 7.1 89
90 Repeat step 2 with the following detail changes:
Larry Mills-Gahl 24.1 91 Site name: egit
92 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 93
94 ===== Step 6 - Install m2eclipse =====
95
96 Repeat step 2 with the following detail changes:
Larry Mills-Gahl 24.1 97 Site name: m2eclipse
98 Site location: [[http:~~/~~/m2eclipse.sonatype.org/sites/m2e>>url:http://m2eclipse.sonatype.org/sites/m2e||rel="nofollow" shape="rect" class="external-link"]]
99 Fragments selected: "Maven Integration for Eclipse (Required)"
100 [[image:attach:fragments_m2e_lmg.png]]
Larry Mills-Gahl 7.1 101
Larry Mills-Gahl 24.1 102 ===== Step 6 - Install WOLips =====
Larry Mills-Gahl 7.1 103
Larry Mills-Gahl 24.1 104 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).
105
Larry Mills-Gahl 7.1 106 Repeat step 2 with the following detail changes:
Larry Mills-Gahl 24.1 107 Site name: WOLips_3_5
108 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"]]
109 Fragments selected: all "Standard Install" components
110 [[image:attach:fragments_wolips.png]]
111
112 ===== Step 7 - Other plugins =====
113
114 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.
115
116 == Configuring Eclipse ==
117
118 ==== wolips binding validation ====
119
120 [[image:attach:wolips_bindingsvalidation.png]]
121
122 ==== wolips spaces around html tags ====
123
124 [[image:attach:wolips_nospaces.png]]
125
126 ==== wolips launching ====
127
128 As of this writing, wolips has forgotten to set the key "-WOHost" with value "localhost". Add it.
129 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)
130 [[image:attach:wolips_launching.png]]
131
132 ==== Set the default jvm ====
133
134 [[image:attach:prefs_jvm.png]]
135
136 ==== Java typing prefs ====
137
138 [[image:attach:prefs_java_typing.png]]
139
140 ==== Java Templates prefs ====
141
142 [[image:attach:prefs_java_templates.png]]
143
144 ==== Run / Debug prefs ====
145
146 I'll have 4 spaces per tab rather than 8 thanks!
147 And I prefer to kill the console buffer manually rather than lose messages that might be important.
148 [[image:attach:prefs_console.png]]
149
150 ==== Launch configurations ====
151
152 I don't like them disappearing on me when I close / delete projects
153 [[image:attach:prefs_launchconfig.png]]
154
155 ==== Lines numbers please ====
156
157 [[image:attach:prefs_linenumbers.png]]
158
159 ==== UTF-8 Thanks ====
160
161 [[image:attach:prefs_utf8.png]]
162
163 == Creating a project ==
164
165 TODO
166
167 == Launching your project ==
168
169 ==== Configure eomodel connection dictionaries, log4j, additional properties ====
170
171 In my application projects I create an additional folder called 'Properties' which contains additional property files for differing launches.
172 e.g.,
173 When connecting to a local database I use the local files listed below during launch:
174
175 {{noformat}}
176
177 jdbc.local.properties
178 log4j.local.properties
179 runtime.local.properties
180 ...
181 jdbc.test.properties
182 log4j.test.properties
183 runtime.test.properties
184
185 {{/noformat}}
186
187 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)
188
189 * key: -runtime.config.dir value:"../../Properties"
190 * key: -runtime.config.name value:".local"
191
192 And in my application's Properties file I have the following properties declared
193
194 {{noformat}}
195
196 runtime.config.dir=Properties
197 runtime.config.name=
198
199 er.extensions.ERXProperties.OptionalConfigurationFiles=(\
200 @@runtime.config.dir@@/log4j@@runtime.config.name@@.properties,\
201 @@runtime.config.dir@@/jdbc@@runtime.config.name@@.properties,\
202 @@runtime.config.dir@@/runtime@@runtime.config.name@@.properties\
203 )
204
205 {{/noformat}}
206
207 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.