New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to JDK 17 #7930
Comments
This is one OKR we have for this quarter :) |
For the problem with the fmt-maven-plugin, I want to propose to the switch to diffplug/spotless, which also has a maven plugin. Main reason for this proposal is that the fmt-maven-plugin seems unmaintained and there was some talk about transferring ownership, but it has not yet happened. It seems unlikely a solution for JDK 17 will be provided soon for the fmt-plugin. Secondary, spotless supports ratcheting which might improve execution speed and it could also allow us to provide formatting of our markdown files, as discussed in #7508 |
When upgrading |
@oleschoenburg That seems like a similar issue as MDEP-753 (linked above). There's a workaround for that one, did you already try using it with a hard dependency to maven-dependency-analyzer 1.11.3? EDIT: There is also some new activity since today in that issue. I recommend subscribing to it to be notified of a potential new release. |
@korthout Yes, I've tried it with the workaround from MDEP-753 but it's still running into the same issues:
EDIT: According to this comment there is no workaround for this. |
@oleschoenburg To make sure we don't forget. Recently, we've added some documentation that mentions the specific JDK version required by Zeebe. We should make sure to update this documentation when we do update. See https://docs.camunda.io/docs/components/zeebe/deployment-guide/interceptors/ |
There seems to be another compilation issue in relation to
The offending generated code looks like this:
Upgrading immutables from |
It's likely this module will not be updated to Java 17 for the time being, partially because it may end up being used by users/customers in the near future. So we can leave it to Java 11 for now. |
One small note: once we've broken down into multiple issues the topic, we can close this issue imo. If you want to keep it as a kind of epic issue, then we can put it back in the backlog. |
I've created an issue with a minimal reproducer for the immutables problem: immutables/immutables#1339 |
It looks like 2.9.0-rc1 was released a bit over a month ago (Sep. 25), and 20 days ago (so on Sep. 29) a PR was merged for Java 17 support, so maybe it's fixed on master? |
No, unfortunately this doesn't fix the issue. |
Regarding the format plugin, I got it to work in another project with the following: <plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>${fmt-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.11.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>format</id>
<goals>
<goal>format</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin> And checking into the project the following
Hopefully the next releases simplify this 😄 |
@npepinpe The |
We have a workaround for the immutables issue: immutables/immutables#1339 (comment) |
Putting this back in planned as I see you will work on single issues. |
8117: Replace fmt-plugin with Spotless r=korthout a=korthout ## Description <!-- Please explain the changes you made here. --> Replaces the `com.coveo:fmt-maven-plugin` plugin with [spotless](https://github.com/diffplug/spotless/tree/main/plugin-maven) and cleans up our build profiles regarding auto-formatting and formatting checks. The fmt-plugin seems to no longer be maintained, or at least it is no longer maintained as well as other plugins. See #7930 (comment). Switching to spotless means switching to an actively maintained project. Using it allows us to update the google-format to v1.12. Spotless works on our jdk8 build. Spotless supports [ratcheting](https://github.com/diffplug/spotless/tree/main/plugin-maven#how-can-i-enforce-formatting-gradually-aka-ratchet) to speed up our builds (~10s per build on our local measurements, should be at least 4 hours per year for our team 🎉 ) and might allow us to replace the different plugins we use related to formatting (sortpom, license, etc) with 1 plugin. We could even add markdown support in the future with some additional effort from our side. This PR switches the fmt-plugin for the spotless plugin, updates the google-format to v1.12.0, enables ratcheting for faster local builds and disables the auto formatting on our CI pipeline. It makes sense to review this PR on a per-commit basis. ## Related issues <!-- Which issues are closed by this PR or are related --> This is the result of slacktime for @oleschoenburg and @korthout. relates to #7930 relates to #7508 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com> Co-authored-by: Nico Korthout <nico.korthout@camunda.com>
I'm closing this for now. The only remaining step is to upgrade modules to language level 17 which is tracked here: #8030 |
* make the fmt-maven-plugin work with Java 17 * follow instructions of camunda/camunda#7930 (comment)
* make the fmt-maven-plugin work with Java 17 * follow instructions of camunda/camunda#7930 (comment)
Description
In my tech talk Preparing for JDK 17 I've highlighted some of the advantages for Zeebe to update to JDK 17. It also discussed the necessary steps that need to be taken:
com.coveo:fmt-maven-plugin
does not work on JDK 15+, see Breaks with JDK 16 spotify/fmt-maven-plugin#99maven-dependency-plugin:3.1.2
needs to be updated to3.2.0
with specific dependency configurations (see: APACHE/MDEP-753)version.java
property to 17 in bom/pom.xml to actually update to JDK17The text was updated successfully, but these errors were encountered: