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. Please check the Upgrade Guide section below for details. 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.
- TypeCoercer now uses mapped configuration so coercion overrides are done in an explicit manner.
- TAP5-2650 - ( )
- It's not possible to use the Tapestry request handling framework, specially the RequestFilter, Dispatcher, Request, Response and HttpServletRequestFilter classes, without the page framework. These classes were moved to a new artifact, tapestry-http, which can be used in place of tapestry-core (which depends on tapestry-http). tapestry-http Servlet filter class is org.apache.tapestry5.http.TapestryFilter. The original TapestryFilter, from org.apache.tapestry5, can be used in the same way way as in past Tapestry versions.
5.7.0 Upgrade Guide
- 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
- 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.
The second step is updating how contributions to the TypeCoercer service in case your projects have them. Here's a real example from Tapestry itself. It used to be done using Configuration, but now it's MappedConfiguration. 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);
}
Improvements made
Key | Summary | T | Created | Updated | Due | Assignee | Reporter | P | Status | Resolution |
---|---|---|---|---|---|---|---|---|---|---|
TAP5-2662 | Make BeanEditor/BeanEditForm/FormGroup more accessible | Feb 12, 2021 | Feb 12, 2021 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2657 | Blacklist modules autoloaded via manifests | Dec 31, 2020 | Feb 11, 2021 | Ben Weidig | Ben Weidig | Closed | Fixed | |||
TAP5-2655 | Create annotation to disable validation in event handler methods | Dec 29, 2020 | May 05, 2022 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2654 | Remove Asset2 by merging it into Asset | Dec 16, 2020 | Mar 28, 2022 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2653 | Upgrade tapestry-spring's spring-web version to 3.2.9 | Dec 08, 2020 | Dec 08, 2020 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2652 | Upgrade EclipseLink version in tapestry-jpa to 2.7.7, the latest | Dec 06, 2020 | Dec 08, 2020 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2651 | TypeCoercer should favor exact match coercions over intermediate ones | Dec 06, 2020 | Feb 11, 2021 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2650 | Change TypeCoercer configuration to MappedConfiguration | Dec 01, 2020 | Jun 05, 2022 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2649 | Configuration should have consistent ordering | Nov 26, 2020 | Feb 11, 2021 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2645 | Java Time API / JSR310 Type Coercers | Oct 16, 2020 | Feb 12, 2021 | Ben Weidig | Ben Weidig | Closed | Fixed | |||
TAP5-2644 | Split HTTP-specific classes from tapestry-core into tapestry-http | Oct 08, 2020 | Dec 02, 2020 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2641 | Turn the Tapestry subprojects into Java 9+ modules (JPMS) | Sep 06, 2020 | Jun 25, 2023 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Resolved | Fixed | |||
TAP5-2640 | tapestry-json improvements (implement Collection/Map, better exceptions) | Sep 06, 2020 | Feb 11, 2021 | Ben Weidig | Ben Weidig | Closed | Fixed | |||
TAP5-2627 | Fix split packages | Jun 01, 2020 | Jan 30, 2021 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Resolved | Fixed | |||
TAP5-2613 | Make the build of tapestry itself pass on Java 11 | Aug 26, 2019 | Dec 02, 2020 | Dmitry Gusev | Dmitry Gusev | Closed | Fixed | |||
Bugs fixed
Key | Summary | T | Created | Updated | Due | Assignee | Reporter | P | Status | Resolution |
---|---|---|---|---|---|---|---|---|---|---|
TAP5-2661 | Allow options to be passed to GoogleClosureMinimizer | Jan 29, 2021 | Feb 15, 2021 | Ben Weidig | Geoff Callender | Closed | Fixed | |||
TAP5-2660 | Empty string and null namespaces should be treated as the same in Element | Jan 26, 2021 | Jan 26, 2021 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2659 | Direct instantiation of ComponentResourceSelector should be replaced with delegation to ComponentRequestSelectorAnalyzer | Jan 11, 2021 | Jun 20, 2021 | Thiago Henrique De Paula Figueiredo | Dmitry Gusev | Closed | Fixed | |||
TAP5-2658 | Tuple should implement hashCode based on its values | Jan 06, 2021 | Feb 11, 2021 | Ben Weidig | Ben Weidig | Closed | Fixed | |||
TAP5-2656 | Disabling strict CSS URL rewriting still throws exceptions for non-existing files | Dec 30, 2020 | Jan 19, 2021 | Thiago Henrique De Paula Figueiredo | Thiago Henrique De Paula Figueiredo | Closed | Fixed | |||
TAP5-2636 | Non-unique advice IDs silently override each other in random order on application startup | Aug 17, 2020 | Feb 11, 2021 | Thiago Henrique De Paula Figueiredo | Dmitry Gusev | Closed | Fixed | |||