Wiki source code of Java Support Strategy
Last modified by Vincent Massol on 2024/02/11 18:39
Hide last authors
author | version | line-number | content |
---|---|---|---|
8.2 | 1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | |
2 | {{toc/}} | ||
3 | {{/box}} | ||
4 | |||
1.1 | 5 | There are lots of Java versions out there and supporting all of them is just too hard to be done in a quality manner. Thus we only support a subset. | |
6 | |||
7 | By "supported versions" we mean: | ||
8 | |||
3.1 | 9 | * XWiki runs fine on that Java version. | |
1.1 | 10 | * Issues created for these versions of Java in JIRA are not closed as won't fix and we make a best effort to fix them. | |
11 | * We include these versions in our tests (be them automated or manual). | ||
12 | |||
13 | = Supported Java Versions = | ||
14 | |||
16.1 | 15 | Terminology: | |
19.3 | 16 | * "source level": This is the Java syntax used in the source of XWiki. From a user point of vue, this can be considered as the minimal Java version that can be used to run XWiki. | |
16.1 | 17 | ||
17.1 | 18 | Rules: | |
14.1 | 19 | * As a general rule we follow the Java LTS release cadence (currently every 2 years), which means that at the beginning of every 2 XWiki cycles, we drop the oldest Java version that we were supporting and start supporting the latest Java LTS (and at the source level we upgrade it by one version too). Examples: | |
20 | ** In XWiki 16.0 (2024), we drop the support of Java 11, continue to support Java 17 (which becomes the new source level), and work as fast as possible to support Java 21 in 16.x. We continue to support Java 11 & 17 for XWiki 15.10.x (XWiki LTS). | ||
21 | ** In XWiki 17.0 (2025), we continue to support Java 17 & 21. We also continue to support Java 17 & 21 for XWiki 16.10.x (XWiki LTS). | ||
22 | ** Java 25 is out in September 2025 | ||
23 | ** In XWiki 18.0 (2026), we drop support for Java 17, continue to support Java 21 (which becomes the new source level), and add support for Java 25 as soon as possible for 18.x. We continue to support Java 17 & 21 for XWiki 17.10.x (XWiki LTS). | ||
24 | * As a best effort, we also try to support more recent Java versions whenever we can. | ||
25 | ** For example, in XWiki 14.10.x we added support for Java 17 | ||
6.1 | 26 | ||
14.1 | 27 | {{info}} | |
28 | Since Java 17+, you need to have the following Java switches to run XWiki: | ||
29 | |||
12.1 | 30 | {{code language="none"}} | |
12.2 | 31 | --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED | |
12.1 | 32 | {{/code}} | |
14.1 | 33 | {{/info}} | |
12.1 | 34 | ||
14.1 | 35 | {{error}} | |
36 | List of issues related to Java 17 & 21: | ||
12.1 | 37 | ||
6.1 | 38 | {{jira id="xwikiorg" source="jql"}} | |
13.1 | 39 | labels = java AND (environment ~"java 17" or environment ~"java 21") and resolution = Unresolved | |
6.1 | 40 | {{/jira}} | |
14.2 | 41 | {{/error}} | |
1.1 | 42 | ||
2.1 | 43 | = By XWiki Versions = | |
44 | |||
9.1 | 45 | |=XWiki Versions|=Java Version supported|=Source Level | |
9.2 | 46 | |XWiki < 6.0|Java 6|Java 6 | |
47 | |XWiki < 8.1|Java 7|Java 7 | ||
48 | |XWiki < 11.3|Java 8|Java 8 | ||
49 | |XWiki >= 11.3|Java 8 & Java 11|Java 8 | ||
13.1 | 50 | |XWiki >= 14.0 & < 15.3|Java 11|Java 11 | |
15.2 | 51 | |XWiki >= 14.10.9/15.3|Java 11 & Java 17|Java 11 | |
18.1 | 52 | |XWiki >= 16.0.0|Java 17|Java 17 | |
2.1 | 53 | ||
19.1 | 54 | = Things to do when increasing the minimum supported Java version in the current branch | |
55 | |||
56 | * add a row to [[the table above>>||anchor="HByXWikiVersions"]] | ||
57 | * update ##<xwiki.java.version>## Maven property in [[xwiki-commons root pom>>https://github.com/xwiki/xwiki-commons/]] | ||
58 | * install the new Java version on the release agent | ||
59 | * update the automatic switch mapping in the [[release script>>https://github.com/xwiki/xwiki-dev-tools/blob/master/xwiki-release-scripts/maven-release.sh]] | ||
60 | * update the automatic java version switch mapping in the [[Jenkins pipeline>>https://github.com/xwiki/xwiki-jenkins-pipeline/blob/master/vars/configureJavaTool.groovy]] |