To edit or add content to this Wiki, you can simply create a new account at http://wocommunity.org/account.

Skip to end of metadata
Go to start of metadata

Introduction

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 (smile).

Outline

Install Maven

You can download and install maven for most platforms here.

Mac Tip

install macports http://www.macports.org/install.php, then on the terminal

sudo port install maven2

In future, to keep this up to date:

sudo port upgrade maven2

Download Eclipse

Eclipse can be downloaded and installed from www.eclipse.org/downloads/. For mac it's just a simple matter of unpacking the zip file downloaded into /Applications or /Users/youraccount/Applications.

Which one do I choose?

Eclipse Classic (161MB) is a popular choice among WO developers.
However, the more lightweight Eclipse IDE for Java Developers (91MB) should work.

Launch Eclipse

Open eclipse by double clicking on the application icon (from where you installed it).

Eclipse will then ask you for the location of a 'workspace' which is where eclipse will store its metadata.

Install Eclipse plugins

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.

Step 1 - Choose the menu item: Help > install new software...

This will open the install window:

Step 2 - install the testNG plugin (for a simple example)

a) Click the "Add..." button to define the update site, fill in the details, click OK.

b) Tick the plugin fragments to install

c) Click next repeatedly, confirming license agreements, finally clicking "Finish" to install.
d) after the software plugin has installed, it will prompt you for a restart of eclipse. Click Yes.

e) after eclipse has restarted, continue...

Step 3 - install Groovy

Repeat step 2 with the following detail changes:
Site name: Groovy-dev
Site location: http://dist.codehaus.org/groovy/distributions/updateDev/

Step 4 - Install subversive connectors

Repeat step 2 with the following detail changes:
Site name: Subversive-connectors
Site location: http://community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site/
Fragments selected: 'Subversive SVN Connectors', 'SVNKit 1.3 Implementation (Optional)'

Step 5 - Install egit

Repeat step 2 with the following detail changes:
Site name: egit
Site location: http://www.jgit.org/updates

Step 6 - Install m2eclipse

Repeat step 2 with the following detail changes:
Site name: m2eclipse
Site location: http://m2eclipse.sonatype.org/sites/m2e
Fragments selected: "Maven Integration for Eclipse (Required)"

Step 6 - Install WOLips

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).

Repeat step 2 with the following detail changes:
Site name: WOLips_3_5
Site location: http://webobjects.mdimension.com/wolips/eclipse_3_5/
Fragments selected: all "Standard Install" components

Step 7 - Other plugins

Oh, sure I also install jadclipse (http://jadclipse.sf.net/update) for keeping in touch with things but that's beyond the scope of this guide.

Configuring Eclipse

wolips binding validation

wolips spaces around html tags (grey lightbulb)

wolips launching

As of this writing, wolips has forgotten to set the key "-WOHost" with value "localhost". Add it.
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)

Set the default jvm

Java typing prefs

Java Templates prefs

Run / Debug prefs

I'll have 4 spaces per tab rather than 8 thanks!
And I prefer to kill the console buffer manually rather than lose messages that might be important.

Launch configurations

I don't like them disappearing on me when I close / delete projects

Lines numbers please

UTF-8 Thanks

Creating a project

TODO

Launching your project

Configure eomodel connection dictionaries, log4j, additional properties

In my application projects I create an additional folder called 'Properties' which contains additional property files for differing launches.
e.g.,
When connecting to a local database I use the local files listed below during launch:

jdbc.local.properties
log4j.local.properties
runtime.local.properties
...
jdbc.test.properties
log4j.test.properties
runtime.test.properties

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)

  • key: -runtime.config.dir value:"../../Properties"
  • key: -runtime.config.name value:".local"

And in my application's Properties file I have the following properties declared

runtime.config.dir=Properties
runtime.config.name=

er.extensions.ERXProperties.OptionalConfigurationFiles=(\
@@runtime.config.dir@@/log4j@@runtime.config.name@@.properties,\
@@runtime.config.dir@@/jdbc@@runtime.config.name@@.properties,\
@@runtime.config.dir@@/runtime@@runtime.config.name@@.properties\
)

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.

  • No labels

1 Comment

  1. The m2eclipse site listed in the setup does not seem to be responding at this time.
    The url http://m2eclipse.sonatype.org/sites/m2e gives the maven eclipse integration without the separate POM and XML editors. I just created a test maven project and the POM editor seems to be in there. (it just seems that it's just not a separate install)