Update a Bonita Studio project to Jakarta EE and Groovy 4
What Bonita Studio migrates for you, and what you must change yourself, when you open a project in Bonita 2027.1 and its Jakarta EE runtime.
Starting with Bonita 2027.1, the runtime implements the Jakarta EE APIs. The javax. packages of Java EE (servlet, persistence, XML binding…) are renamed jakarta., and Groovy moves from version 3 to version 4, whose Maven coordinates changed from org.codehaus.groovy to org.apache.groovy.
When you clone or import a project from a previous version, Bonita Studio migrates the Maven configuration of the project and of its extensions. It does not rewrite your Java or Groovy source code: this part is manual.
Read the migration notes first
Bonita Studio writes the changes it applies, and the actions it leaves to you, in two places:
-
app/MIGRATION_NOTES.adoc, in theappmodule of the project, opened after the migration (see Updating Bonita Studio): the changes to the project pom and to the poms of the Business Data Model modules. -
extensions/<extension>/MIGRATION_NOTES.adoc, one per migrated extension: the changes to the extension pom, and the actions about the extension poms and sources. This file is not opened for you: open it for each extension.
Look for the lines starting with Action required: each of them describes an action you must take.
What Bonita Studio migrates for you
Servlet API in REST API extension poms
In every REST API extension project, the javax.servlet:javax.servlet-api dependency is replaced by jakarta.servlet:jakarta.servlet-api without version: the version is managed by the Bonita runtime BOM. The dependency keeps its scope, provided in the poms generated by Bonita.
A javax.servlet-api version pinned in the dependencyManagement section of the extension pom is removed, since it would override the runtime BOM.
Before:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
After:
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
|
Dependencies declared inside a Maven |
Groovy 4 coordinates
In the project pom and in every extension pom, the Groovy dependencies generated by Bonita move from the org.codehaus.groovy group to the org.apache.groovy group, without version: the project pom inherits the versions from its bonita-project parent, the extension poms from the Bonita runtime BOM. A Groovy dependency that Bonita did not generate, for example one with a version you set, is left unchanged, see Groovy dependencies you declared yourself.
-
groovy-allis replaced by the individual Groovy modules the runtime provides. The other modules it brought transitively, such asgroovy-ant,groovy-swingorgroovy-console, are not provided by the runtime either. -
groovy-servletis removed: the Bonita runtime no longer provides it. -
In the extension poms, the
spock-coreversion written by a previous Bonita archetype or migration is set to2.4-groovy-4.0, the version new extensions are generated with. If the extension still used Spock 1 (1.x-groovy-2.4, from the oldest REST API extension archetypes), this is also an upgrade to Spock 2: read the Spock 2.0 migration guide.
Before:
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<scope>provided</scope>
</dependency>
After:
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<scope>provided</scope>
</dependency>
Groovy compiler of the extensions
In REST API extension, connector and actor filter poms, the maven-compiler-plugin declaration that selects the Groovy-Eclipse compiler is removed: the extensions parent now configures this compiler. Configuration you added to that plugin, such as annotationProcessorPaths or compilerArgs, is removed with it. When the removed plugin carried more than the compiler selection, the extension migration notes report it without listing what was removed: compare the extension pom with its previous version (Git history or the exported .bos) and add back what your extension needs.
New extensions
REST API extensions, connectors and actor filters created from Bonita Studio 2027.1 are generated from the Jakarta versions of the Maven archetypes: REST API extensions declare jakarta.servlet-api, and the extensions written in Groovy declare the org.apache.groovy coordinates.
What you must change yourself
Imports in your extension sources
Replace the javax. imports of the renamed Jakarta EE packages with their jakarta. equivalent in the Java and Groovy sources of your extensions. For a REST API extension, it is at least the servlet API used by the doHandle method:
Before:
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
After:
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
Bonita Studio flags these imports in the sources of REST API extensions: a Jakarta migration warning is shown in the editor and in the Problems view, next to the compilation error.
|
Only the Java EE packages are renamed. The packages that belong to the Java SE platform keep their |
Packages most often found in Bonita extensions:
| Bonita 2026.2 and earlier | Bonita 2027.1 and later |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If your extension embeds a third-party library compiled against javax.servlet or another renamed package, upgrade it to a Jakarta-compatible version: the Bonita runtime no longer provides the javax APIs.
Business Data Model
The BDM classes are generated when the project is built, by its bdm Maven modules, and now use jakarta.persistence. Code of yours that imports javax.persistence directly, for example in a REST API extension, must be updated as described above.
Up to Bonita 2026.2, Bonita Studio declared javax.persistence:javax.persistence-api without version in the pom of the bdm/dao-client module. The migration removes this declaration, which no longer resolves. If you set a version on it, the dependency is kept and the migration notes ask you to remove it, unless your own code in this module needs it.
Groovy dependencies you declared yourself
Only the Groovy dependencies that look like the ones Bonita generates, with no version, no classifier, a provided scope or no scope, and outside any <profile>, are moved to org.apache.groovy: Studio cannot tell them from yours. In an extension pom, a version taken from a groovy.version or groovy-all.version property counts as generated too. A Groovy dependency with a version you set, a compile scope, a classifier, or declared inside a <profile>, keeps its org.codehaus.groovy coordinates and is reported in the migration notes. Move it to the org.apache.groovy group yourself, or remove it if the runtime provides the module. groovy-servlet is the exception: do not move it, remove it, see Usages of groovy-servlet.
A Groovy module set on the classpath of a Maven plugin, for example groovy-xml declared on groovy-maven-plugin, is neither migrated nor reported: check the plugin declarations of your poms.
Spock versions you chose
A Spock version that you set yourself, rather than one written by a Bonita archetype, is not changed, and neither are the other Spock artifacts, such as spock-reports or spock-spring. Spock publishes one artifact per Groovy major version, and the -groovy-2.x or -groovy-3.0 variants do not run on Groovy 4: switch to a -groovy-4.0 variant. Spock 1 published nothing after -groovy-2.5, so a Spock 1 version also means moving to Spock 2. The migration notes of an extension that declares Groovy list the Spock dependencies concerned.
Usages of groovy-servlet
If your code used classes of groovy-servlet (groovy.servlet.*), Bonita Studio removed the dependency during the migration if it had generated it. If you declared org.codehaus.groovy:groovy-servlet yourself, in the project pom or in an extension pom, it is left in place and reported in the migration notes; so is an org.apache.groovy:groovy-servlet declared in the project pom. An org.apache.groovy:groovy-servlet declared in an extension pom is not reported: check your extension poms. Remove the dependency in every case, and remove these usages as well: the Groovy 4 version of groovy-servlet only exists for javax.servlet, and its Jakarta version requires Groovy 5, which Bonita 2027.1 does not provide.
Dependencies the runtime BOM no longer manages
Up to Bonita 2026.2, an extension could declare the following dependencies without version, managed by the Bonita runtime BOM. Bonita 2027.1 manages their Jakarta replacement instead, and Bonita Studio does not migrate them: an extension pom that still declares one without version no longer resolves.
| Bonita 2026.2 and earlier | Bonita 2027.1 and later |
|---|---|
|
|
|
|
|
|
|
|
Replace the dependency with its Jakarta replacement, without version, and update the code that uses it as described in Imports in your extension sources. For commons-fileupload, the classes also moved to the org.apache.commons.fileupload2 packages, and ServletFileUpload is replaced by JakartaServletFileUpload.
The JSTL API (jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api) is no longer managed at all: declare a version yourself if your extension needs it.
XML classes in your Groovy scripts
Groovy 4 removed the XML classes that Groovy 3 still kept in the groovy.util package: XmlSlurper, XmlParser and the groovy.util.slurpersupport classes such as GPathResult only exist in groovy.xml now. This applies to every Groovy script of the project: diagram scripts, connector input scripts and extension sources.
Since groovy.util is imported by default in Groovy, a script that uses new XmlSlurper() without any import is affected too. Bonita Studio reports it as a compilation error, for example unable to resolve class XmlSlurper. Add the import:
import groovy.xml.XmlSlurper
def response = new XmlSlurper().parseText(xml)