You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Upgrading from one Tapestry version to the next is usually quite easy. Backward compatibility is a very high priority for the Tapestry team. Even so, sometimes a checklist comes in handy to be sure you consider all of the implications of an upgrade.

Before You Upgrade

  1. Check 3rd Party compatibility: Find out whether your 3rd party modules are compatible with the new version of Tapestry. Although the Tapestry developers try very hard to maintain backward compatibility across versions, sometimes older versions of 3rd party modules (particularly those that use internal APIs) don't work with a newly-released version of Tapestry, and in that case you may have to wait until that 3rd party module is updated by its developers.
  2. Find and replace all calls to deprecated APIs. Those are the places most likely to be broken after the upgrade. Most IDEs make it easy to find all deprecated items. In Eclipse, for example, the "Problems" view will show warnings for the use of deprecated APIs if you set it to show "All Errors/Warnings on Project".
  3. Read the Release Notes: Each Tapestry version has a Release Notes document that lists all of the changes, including some that may cause compatibility issues with your current code. You will save yourself a lot of frustration if you carefully read this material before proceeding.

Upgrading

  1. Update your POM (or download the JARs manually): If you're using Maven, update the version of the Tapestry dependencies in your pom.xml file. Remember to keep all of the Tapestry-supplied modules in sync. For example, don't forget to update the version of Tapestry-hibernate, Tapestry-spring, Tapestry-upload, etc.
  2. Remove old Tapestry JARs: If you're not using Maven dependency management (e.g. if you have the Tapestry JARS in your lib directory), be sure you remove older versions of Tapestry JARS (including JARs for any Tapestry-supplied modules).

After You Upgrade

  1. Remove cached JavaScript: Tapestry's internal JavaScript may change between releases, and your web browser may have cached the older version. If you have set a specific APPLICATION_VERSION in your application's module class (usually AppModule.java), you should increment it to ensure that the URLs to the JavaScript files will have a new version number in their paths. Doing so will cause the browser to download the latest versions from your server. Alternatively, you can just clear your browser's cache (and have all your developers and testers do the same). This issue is usually not a problem on production servers, since you will likely increment the application version with each new production release.
  • No labels