Download Wonder Source, Build, Install and Upgrade

Version 157.1 by Kieran Kelleher on 2010/09/27 17:50

Introduction

Instead of downloading the Wonder binaries, working from the latest source code directly can have some advantages such as:

  • Learn very much about WebObjects and EOF (and java dev styles?)
  • Easily browse and search the source
  • Work with a specific svn version (teams, quality control, development cycles)
  • Provide opportunities to submit patches for bug fixes or enhancements
  • Add logging statements in Wonder source so you can better understand what is going when tracking down hard to find bugs
  • Discover the many Hidden Treasures of Wonder

Source Frameworks Initial Installation

Open a terminal and navigate to a directory where you want to maintain a source "working copy" and just use the following easy-peasy commands to download the Wonder source. Note that the build and installation commands are slighly different for WebObjects 5.4.X. So procedures for both WebObjects 5.4.X and 5.3.X are shown below. Pick you poison:

Procedure for WebObjects 5.4.X

# Checkout the source from subversion repository into a new directory named "WonderSource"
# Note instead of HEAD, you can use a specific svn version number if you want
svn co http://wonder.svn.sourceforge.net/svnroot/wonder/branches/Wonder_5_0_0_WebObjects_5_4_Branch/Wonder --revision HEAD WonderSource

# Navigate into the working copy root
cd WonderSource

# Build the frameworks from the source (BTW, they get built into a directory named Roots in your home dir)
ant frameworks

# Install the frameworks (this just copies the built frameworks from ~/Roots to
# the runtime Frameworks directory, usually at /Library/Frameworks)
sudo ant frameworks.install
Procedure for WebObjects 5.3.X

# Checkout the source from subversion repository into a new directory named "WonderSource"
# Note instead of HEAD, you can use a specific svn version number if you want
svn co http://wonder.svn.sourceforge.net/svnroot/wonder/trunk/Wonder --revision HEAD WonderSource

# Navigate into the working copy root
cd WonderSource

# Build the frameworks from the source (BTW, they get built into a directory named Roots in your home dir)
ant frameworks

# Install the frameworks (this just copies the built frameworks from ~/Roots to
# the runtime Frameworks directory, usually at /Library/Frameworks)
sudo ant frameworks.install

Source Frameworks Upgrade Installation

Assuming you already installed Wonder from source using the method outlined above, you can use the following procedure to upgrade to a newer, or just different version. Note that the procedure for both WebObjects 5.4.X and 5.3.X are outlined below. They are the same except for the last 3 ant commands.

Procedure for WebObjects 5.4.X

# Navigate to the Roots directory that was automatically created by the initial Source installation procedure above
cd ~/Roots/

# Delete all installed frameworks whose names match the built frameworks in this Roots build folder
for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done

# Navigate to the original Wonder source directory that you created above during initial source installation
cd /path/to/WonderSource

# Update the source to the HEAD revision (aka latest). You can also use a specific svn
# repository version instead of the term 'HEAD', for example 11272
svn update --force --accept theirs-full --revision HEAD

# Clean the previous build artifacts
ant clean

# Build from the latest source
ant frameworks

# Install the latest built frameworks
sudo ant frameworks.install
Procedure for WebObjects 5.3.X

# Navigate to the Roots directory that was automatically created by the initial Source installation procedure above
cd ~/Roots/

# Delete all installed frameworks whose names match the built frameworks in this Roots build folder
for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done

# Navigate to the original Wonder source directory that you created above during initial source installation
cd /path/to/WonderSource

# Update the source to the HEAD revision (aka latest). You can also use a specific svn
# repository version instead of the term 'HEAD', for example 11272
svn update --force --accept theirs-full --revision HEAD

# Clean, build and install the frameworks
ant clean; ant frameworks; sudo ant frameworks.install

Information

If you have any trouble or errors due to your working copy getting hosed, then simply delete the entire working copy directory, the \/Roots directory and just start over using the initial source installation procedure outlined above.

Information

If you have a custom wolips properties file for a specific workspace and you want to have a specific Wonder source working copy for that workspace, you can simply link your custom wolips properties file to a soft link named build.properties in the working copy root directory. The Wonder build script will supersede all other filesystem layout poperties with the properties in that file.

For example:

{code}
$ cd my/special/purpose/working/copy/of/Wonder
$ ln -s /Library/Application\ Support/WOLips/wolips.custom.properties build.properties
{code}

An example of where this approach might be used would be when you have different projects (perhaps in a specially designated workspace) that use a specific version of WebObjects and a specific version or branch of Wonder.

*Tip:* Specify a custom build directory for Wonder by adding the property 'wo.external.root' to the custom wolips properties file, for example
{code}
wo.external.root=/Users/mike/Developer/special/directory/Roots
{code}

*Tip:* A custom WebServer install directory can be specified to Wonder by adding the property 'wo.server.root' to the custom wilips properties file also.