Change default application bundle names

Last modified by Kieran Kelleher on 2007/08/29 07:34

Introduction

Sometimes you want your app to be built as a different name. One example of this is where you want to do rolling updates whereby you want to deploy a new version to same destination server paths without overwriting the current version's files. Then at your convenience, you can change the Monitor config to point to the new version executable for new instances only. The new version can be rolled out by simply adding new instance(s) and when a new instance has been launched, "Refuse Sessions" can be set on the old version instance(s) to gracefully shut it(them) down. The woapplication task in the build.xml file makes this trivial.

Information

This tip is nothing to do with the launch application name and URL. This primarily affects bundle and executable names for the application.

How to do it

By setting the name attribute of the woapplication task to something other than the default ${project.name}, the generated application bundle, split install, app jars, executables, etc all will reflect this custom name. For example if you use subversion, the command "svn info" provides the current revision, so if the current revision is 1234, then you could build the app as "projectname-1234.woa" as shown below.

Example - changing deployment app name to projectname-version

        <woapplication name="${project.name}-1234"  stdFrameworks="false"
                                           destDir="${dest.dir}"
                                           customInfoPListContent="${customInfoPListContent}"
                                           principalClass="${principalClass}"
                                           webXML="${webXML}"
                                           webXML_CustomContent="${webXML_CustomContent}">
Information

If you have split install enabled, that bundle will also have the new name and the URLs generated by the application to those static webserver resources will reflect that custom bundle name also.