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

Compare with Current View Page History

Version 1 Next »

Tapestry 5.7.0 is a new major version which needs a migration step for projects using previous versions. To upgrade, update the dependency in your build configuration (Maven POM, Gradle build script, etc.) – or Download the new JAR file. In addition, download the migration tool jar from https://repo1.maven.org/maven2/org/apache/tapestry/tapestry-version-migrator/5.7.0/tapestry-version-migrator-5.7.0.jar and run "java -jar tapestry-version-migrator-5.7.0.jar upgrade 5.7.0" (without quotes) in the command line. It will process all .java files found in the current folder and its subfolders, recursively. This is a step that only needs to be done once. Please also review the How to Upgrade instructions before upgrading.

The main new features are:

  • Partial Java 9+ modules (JPMS) support. It's partial because module-info.java classes are not provided yet. On the other hand, Tapestry's JARs don't have split packages anymore, making them easier to be used with Java 9+ modules. Many classes had to be moved to other packages, and sometimes even to a different JAR. The migration tool mentioned above will take care of updating your code so it uses the correct new fully-qualified class names for the ones that were moved and/or renamed.
    • Unable to render Jira issues macro, execution error. Unable to render Jira issues macro, execution error.
  • TypeCoercer now uses mapped configuration so coercion overrides are done in an explicit manner. Please check the TypeCoercion Upgrade Guide section below for details.
    • Unable to render Jira issues macro, execution error.

Improvements made

key summary type created updated due assignee reporter priority status resolution

JQL and issue key arguments for this macro require at least one Jira application link to be configured

Bugs fixed

key summary type created updated due assignee reporter priority status resolution

JQL and issue key arguments for this macro require at least one Jira application link to be configured



TypeCoercion Upgrade Guide

One breaking in 5.7.0 is changing the TypeCoercer service from having an unordered configuration to a mapped one. This was done so it's very clear when a coercion is overriden. Here's a real example from Tapestry itself: if you had a contribution method like this:


@Contribute(TypeCoercer.class)
public static void provideCoercions(Configuration<CoercionTuple> configuration)
{
    configuration.add(CoercionTuple.create(String.class, JSONObject.class, new StringToJSONObject()));
}

it should be changed to this:

public static void provideCoercions(MappedConfiguration<CoercionTuple.Key, CoercionTuple> configuration)
{
    CoercionTuple<String, JSONObject> stringToJsonObject = CoercionTuple.create(
        String.class, JSONObject.class, new StringToJSONObject());
    configuration.add(stringToJsonObject.getKey(), stringToJsonObject);
}
  • No labels