Introduction

The previous tutorial articles provide details of customization of the default ant build script that is present in your WebObjects projects. This article provides a fully custom build script that you can just drop into your project and use it as an alternative to the default build.xml. This script is called the "split_embedded_build" script. Along with providing the script, this article explains in detail what deployment artifacts are produced by the build. Hopefully the functionality in this script will make their way into the standard script someday with configuration parameters settable in a simple way in the build.properties file.

Pre-requisites

This script only works with the modern WOLips project format and the WOnderApplication project template format (since the layout of regular projects is now similar to Wonder layout). However the script is easily changed to accommodate the "old" standard format by changing the dir names in the script (for example "Sources" in the new project layout was "src" in the old layout)

This layout is the standard layout for all WebObjects projects created by WOLips (rev #4735 at least). The distinct folder names indicate if your project is in this modern format and if yours is the same, then this ant script should work.

Installation and Usage of the Script

Have no fear (wink) , you will not break anything by dropping this script as is into your project and trying it out. You can just use it as is without replacing your default build.xml

Customizing Application/Bundle Name

It is common to want to use custom bundle build names. There are a number of advantages to having a unique application name for each build:

OK, so getting to the point, an optional custom app name can be set in the project's build.properties file by simply adding a property "build.app.name" as shown below.

Features

The desirable features of this script are

Anatomy of Embedded Split Install Bundles produced by this Ant Script

The two compressed "ready-to-deploy" bundles are highlighted below

The notable aspects of the embedded build structure are shown below.

Application Bundle

  • Opening the app executable (command line script at bundle root having the application name as its name) and looking at the end will reveal that the WOFrameworksBaseURL references the frameworks inside the webserver embedded bundle.
  • Examining the Contents/MacOS/MacOSClassPath.txt file will reveal that the java classpath refers to all the jars inside the embedded bundle.

The application bundle typically gets installed as follows:

WebServer Bundle

The webserver bundle typically gets installed as follows:

Compatibility

This script was developed and tested on Mac OS X 10.4.10, Eclipse 3.3.1 and WOLips #4735. It should be compatible with later versions of WOLips and Eclipse. It works with regular WebObjects apps and Wonder based apps. I don't have a Windows Eclipse/WOLips installation, so if you are a Windows user, please feel free to make necessary changes and submit revised build script if this does not run on Windows.