Introducing Grails Framework 6.1.0 Release
November 14, 2023
The Grails Foundation is excited to announce the release of Grails Framework 6.1.0! This release comes with a host of changes, bug-fixes, and improvements that will further enhance your experience with the Grails framework . Grails continues to be a powerful and efficient framework for building web applications in Groovy, and this latest version takes it to the next level. Let's dive into what's new in Grails 6.1.0.
In this release, we have made several changes to improve the framework's performance and maintainability. Some of the notable changes include:
Update to SnakeYaml 2.2: This update fixes the CVE-2022-1471 reported in December of last year. This unsafe deserialization problem could easily lead to arbitrary code execution under the right circumstances. For more details on this vulnerability, you can read about it on Snyk's blog.
Decoupling the Sitemesh Plugin: We have introduced significant changes to decouple the Sitemesh plugin for more flexibility. Here are the details:
Created a new
org.grails.plugins:sitemesh2and moved Sitemesh specific tag libraries that require the Sitemesh2 dependency into a separate Sitemesh2 specific plugin. This plugin can now be optionally used, providing more flexibility in choosing Sitemesh versions.
Introducing the Sitemesh3 Grails Plugin, a new plugin that can be independently used with Grails 6. This plugin offers compatibility with the latest Sitemesh version, allowing developers to leverage the benefits of Sitemesh3 in their Grails applications.
To migrate from Sitemesh 2 to Sitemesh 3, not only completely decouples Sitemesh from GSP, but it also introduces a powerful new feature that GSP has been lacking: Decorator Chaining. With SiteMesh 3, you can apply multiple decorators to a view. For instance, something like this:
<meta name="layout" content="my-decorator,my-other-decorator" />
This enhancement provides more flexibility in structuring views and layouts, making it easier to create complex and dynamic page layouts.
Going Further (JDK 17) - Jakarta compatible SiteMesh 3.2 is already available. Sitemesh 3 supports JDK 17, making it an easier transition to future Grails releases, such as Grails 7.0.
To learn more about updates around Grails and Sitemesh, please review the discussion. This discussion provides insights into the decisions and considerations made during the decoupling process.
These changes aim to provide developers with more choices and the ability to use the Sitemesh version that best suits their application requirements.
Updated Micronaut Groovy to version 3.4.0 for better compatibility.
Escaped Javadoc special characters for improved documentation.
Update Spring Core to 5.3.30, and Spring Boot 2.7.16.
Updated various dependencies and plugins to their latest versions.
These changes will not only make Grails more efficient but also ensure that it remains current and compatible with the latest technologies.
Bug Fixes and Improvements
Grails 6.1.0 also addresses several bug fixes and improvements, including:
- An update to GSP version 6.1.0.
- An update to the grails-testing-support monorepo to version 3.1.0.
These updates will enhance the stability and reliability of the framework.
Keeping up with the latest dependencies is crucial for the health of any framework. In this release, we have upgraded various dependencies to their latest versions, including but not limited to the following:
commons-io:commons-ioto version 2.15.0.
org.jsoup:jsoupto version 1.16.2.
Micronautto version 3.10.2.
Gradleto version 7.6.3.
Apache Tomcatto 9.0.81.
JUnit Jupiterto 5.10.0, and
JUnit Platformto 1.10.0.
- And many more.
These upgrades ensure that Grails 6.1.0 remains compatible with the latest libraries and tools, providing developers with a robust and reliable environment. We recommend checking out the GitHub release page for more information.
Installing Grails 6.1.0
If you don't have SDKMan installed, follow the instructions at SDKMan Installation Guide to set it up.
Once SDKMan is installed, open your terminal and run the following command to install Grails 6.1.0:
sdk install grails 6.1.0
You're all set! To verify the installation, run:
Upgrading Your Existing Applications to Grails 6.1.0
If you already have a Grails application and want to upgrade to the latest version, follow these steps:
Open the project in your favorite IDE (preferably JetBrain's IntelliJ IDEA).
Update your application's
gradle.propretiesfile to specify Grails 6.1.0 as the desired version.
Make any necessary adjustments to your application code, configuration, and dependencies to ensure compatibility with the new version.
Normally, Grails Core dependencies are automatically updated using the Grails Bill of Materials (BOM). However, if you have specific versions defined in your build configuration, you may need to manually update them to align with Grails 6.1.0.
By following these steps, you can smoothly transition your existing Grails application to the exciting Grails 6.1.0.
Exploring Alternative Approaches
If manual dependency updates seem daunting or you want a more streamlined approach, consider the following alternatives:
1. Use Grails Forge Website
Visit https://start.grails.org and generate a new Grails application with Grails 6.1.0. Compare the versions in the newly generated application with your existing one to identify any discrepancies. This can serve as a reference point for your update.
2. Automated Dependency Update Bots
Configure automated dependency update bots like Renovate or Dependabot with your source control platform (e.g., GitHub). These bots can automatically detect and update outdated dependencies in your project, including Grails dependencies, saving you time and effort in manual updates.
With these steps and alternative approaches, you should be well on your way to enjoying the exciting features and improvements in Grails 6.1.0. Happy coding!
We would like to extend our heartfelt thanks to all the contributors who made Grails 6.1.0 possible. Special thanks to:
Their dedication and hard work have significantly contributed to the success of Grails 6.1.0.
With all these exciting changes and improvements, Grails 6.1.0 is set to offer an even better experience for developers working on web applications. Whether you're an experienced Grails developer or just getting started, this release has something for everyone.
Join the Grails Slack community, share your feedback, and contribute to making Grails framework even better in the future. Happy coding!