Home / Java Patterns and Pitfalls     frequal.com

Enabling Flavour In Java 11, 17, and 21

The Flavour archetype is written with backwards compatibility for Java 8. To use with newer versions of Java, a few small tweaks are needed:

Changes in pom.xml

In properties:
     <flavour.version>0.3.1-SNAPSHOT</flavour.version>
     <teavm.version>0.10.0</teavm.version>
In maven-compiler-plugin:
         <version>3.11.0</version>
In maven-war-plugin:
         <version>3.4.0</version>
That's it, 4 small version updates.

Tools

Set up and run your tools to make the new build:
  1. Ensure you have a new LTS version of Java installed.
  2. Set JAVA_HOME to point to it.
  3. Then re-run maven and the build should succeed.

Last modified on 10 Nov 2024 by AO

Copyright © 2024 Andrew Oliver