Newsletters
Abstract
IBM Dependency Based Build 1.1.3 and 1.0.10 both include an upgrade from Groovy 2.4.12 to Groovy 4.0.0. This upgrade contains compatibility issues that may require manual modifications to existing build scripts.
Content
See the following Groovy release notes for complete migration and adoption details:
- Groovy 4.0 release notes
- Groovy 3.0 release notes
- Groovy 2.5 release notes
Path changes
Groovy is now located in the "DBB_HOME"/groovy directory. Any scripts that reference the "DBB_HOME"/groovy-2.4.12 directory must be updated with the new Groovy path.
The "classpath" element of the process definitions template "DBB_HOME"/conf/process_definitions.xml has been updated to reflect the new location of the Groovy libraries. Process definitions files that have been customized must be modified to include the updated path.
Groovy script encoding
Groovy 4.0.0 assumes that all Groovy scripts are UTF-8 encoded. The "DBB_HOME"/bin/groovyz script has been modified to specify IBM-1047 as the encoding for all scripts. Perform the following steps if your scripts use a different encoding:
- Copy the "DBB_HOME"/bin/groovyz script to a writeable location on the file system.
- Find the line ARGS="-c IBM-1047 $ARGS" and update it to use the correct file encoding for your environment.
- Save the file.
- Use the updated version of groovyz to run your Groovy scripts.
The Groovy launch script "DBB_HOME"/groovy/bin/groovy has not been updated to make assumptions about the script encoding. If you use this launch script, you must add a command line option formatted as -c "encoding" (where "encoding" represents your encoding) when you run scripts that are not UTF-8 encoded.
Package changes
Many commonly used classes have been moved from the groovy.util package to more modular package names. This will cause script breakage because Groovy no longer imports the classes by default. Commonly encountered changes include:
- CliBuilder has moved from package groovy.util to groovy.cli.commons.
- AntBuilder has moved from package groovy.util to groovy.ant.
- Groovy 4.0.0 no longer includes Apache Commons Logging in its lib directory. Scripts that rely directly on this project must be updated to include the jar file from the
"DBB_HOME"/lib directory on their classpath.
Sample updates
The Dependency Based Build samples repository and the zAppBuild framework have been updated to reflect the Groovy 4.0.0 changes described in this document. The latest version of these repositories must be pulled for use with the new Groovy release.
You must apply the Groovy 4.0.0 changes to any forked versions of the samples or zAppBuild.
Product Synonym
DBB
Was this topic helpful?
Document Information
Modified date:
15 March 2022
UID
ibm16561887