OptaPlanner logo
  • Download
  • Learn
    • Documentation
    • Videos

    • Use cases
    • Compatibility
    • Testimonials and case studies
  • Get help
  • Blog
  • Source
  • Team
  • Services
  • Star
  • T
  • L
  • F
  • YT
Fork me on GitHub

OptaPlanner 9 has been released

Mon 24 April 2023
Avatar Radovan Synek
Radovan Synek

LinkedIn GitHub

OptaPlanner developer

In the previous article OptaPlanner 9 is coming we explained why we are doing OptaPlanner 9. Now OptaPlanner 9.37.0.Final has been released to enable users migrate to Jakarta EE, Quarkus 3 and Spring Boot 3.

Differences between OptaPlanner 8 and 9

OptaPlanner 8 and 9 are fully compatible regarding their APIs and equal feature-wise. The differences are coming from package-level changes brought by Jakarta EE 10 that impact the entire Java ecosystem. OptaPlanner has to react, too. We decided to make the transition smooth by releasing two parallel streams: 8 and 9.

The following table summarizes the compatibility of both OptaPlanner streams:

OptaPlanner 8 OptaPlanner 9

Jakarta EE

8 (via Quarkus)

10 (via Quarkus)

Quarkus

2

3

Spring Boot

2

3

Apart from those, OptaPlanner 9 currently does not support DRL score calculation when used together with Quarkus. If you use the DRL score calculation, migrate to the Constraint Streams API as DRL has long since been deprecated. Also, OptaPlanner 9 no longer supports the AbstractScoreHibernateType and its subtypes. Please see the upgrade recipe for more details.

Which one to use?

The previous article covers this question; let me shortly repeat the recommended approach:

Which OptaPlanner stream to choose?

To summarize, switch to OptaPlanner 9:

  • If you’re starting a new project,

  • or if you don’t use Quarkus and Spring Boot.

What’s next

Both OptaPlanner 8 and 9 are going to be released together under the same minor version. Every new feature will be available in both streams.

Will it stay like that forever? No. At some point, when there is enough adoption of OptaPlanner 9, the release train of OptaPlanner 8 will stop, as it will have served its purpose: help transition users to the new version.

The important message is: even if you decide to stay on OptaPlanner 8 for now, do plan your migration.

How do I migrate to OptaPlanner 9?

For those who don’t use Quarkus or Spring Boot, the migration is likely just about changing a version of the optaplanner-bom:

<dependency>
    <groupId>org.optaplanner</groupId>
    <artifactId>optaplanner-bom</artifactId>
    <version>9.37.0.Final</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>

For users of optaplanner-quarkus or optaplanner-spring-boot-starter, the changes will be larger:

  • All imports of javax. packages will need to be replaced by their jakarta. equivalents, including changes to dependencies.

  • Dependencies on Quarkus 2 need to be changed to Quarkus 3.

  • Dependencies on Spring Boot 2 need to be changed to Spring Boot 3. In case of Spring Boot 3, a migration to Java 17 is also necessary. That is the decision of the Spring framework team, and we can not influence that.

We have created tooling to simplify this transition. Simply run the following commands while in the root directory of your project:

mvn clean org.openrewrite.maven:rewrite-maven-plugin:4.43.0:run \
   -Drewrite.recipeArtifactCoordinates=org.optaplanner:optaplanner-migration:9.37.0.Final \
   -Drewrite.activeRecipes=org.optaplanner.migration.ToLatest9

Summary

OptaPlanner 9 has been released and, with few exceptions, remains functionally equivalent with OptaPlanner 8. We will continue releasing OptaPlanner 8 as well for the time being, but at some point there will be only OptaPlanner 9. There is an automated script to help you with the migration.


Permalink
 tagged as migration jakarta javax javaee quarkus spring boot

Comments

Visit our forum to comment
AtomNews feed
Don’t want to miss a single blog post?
Follow us on
  • T
  • L
  • F
Blog archive
Latest release
  • 9.44.0.Final released
    Wed 6 September 2023
Upcoming events
    Add event / Archive
Latest blog posts
  • Scaling Up Vehicle Routing Problem with planning list variable and Nearby Selector
    Thu 27 April 2023
    Anna Dupliak
  • OptaPlanner 9 has been released
    Mon 24 April 2023
    Radovan Synek
  • OptaPlanner 9 is coming
    Tue 21 February 2023
    Lukáš Petrovický
  • Farewell - a new lead
    Tue 15 November 2022
    Geoffrey De Smet
  • Run OptaPlanner workloads on OpenShift, part II
    Wed 9 November 2022
    Radovan Synek
  • Bavet - A faster score engine for OptaPlanner
    Tue 6 September 2022
    Geoffrey De Smet
  • Run OptaPlanner workloads on OpenShift, part I.
    Thu 9 June 2022
    Radovan Synek
  • Blog archive
Latest videos
  • The Vehicle Routing Problem
    Fri 23 September 2022
    Geoffrey De Smet
  • Introduction to OptaPlanner AI constraint solver
    Thu 25 August 2022
    Anna Dupliak
  • On schedule: Artificial Intelligence plans that meet expectations
    Sat 23 July 2022
    Geoffrey De Smet
  • Host your OptaPlanner app on OpenShift (Kubernetes)
    Mon 7 February 2022
    Geoffrey De Smet
  • OptaPlanner - A fast, easy-to-use, open source AI constraint solver for software developers
    Mon 31 January 2022
  • Order picking planning with OptaPlanner
    Fri 31 December 2021
    Anna Dupliak
  • AI lesson scheduling on Quarkus with OptaPlanner
    Thu 18 November 2021
    Geoffrey De Smet
  • Video archive

OptaPlanner is open. All dependencies of this project are available under the Apache Software License 2.0 or a compatible license. OptaPlanner is trademarked.

This website was built with JBake and is open source.

Community

  • Blog
  • Get Help
  • Team
  • Governance
  • Academic research

Code

  • Build from source
  • Issue tracker
  • Release notes
  • Upgrade recipes
  • Logo and branding
CC by 3.0 | Privacy Policy
Sponsored by Red Hat