-
Notifications
You must be signed in to change notification settings - Fork 23
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
Build failure with JDK 17 #102
Comments
Hey @danieledipompeo, yes, I'm observing the same when building with Java 17. JDK 16 will work, or 17, if you adjust the target release version in the POM to 17. It's not clear to me yet why this happens, building with 17 but targetting 16 should work, too. If you get to the grounds of it, any ideas would be much appreciated. |
That said, if you would like to send a PR for updating the target release to 17, I'd be happy to merge that. 16 doesn't make much sense anyways at this point (unmaintained). If there is an earlier version that we'd want to support, it'd be 11 (previous LTS). In order to do so, we'll need an alternative implementation though which polls on recording files instead of using JFR event streaming, which only was introduced in 14. // CC @Croway, @phejl @aalmiray |
Hi @gunnarmorling, @danieledipompeo, I wanted to do the same and had the same error, I think it is due to jdk.internal.event module exposure is changed in jdk17, I managed to let jfrunit build on jdk17 https://github.com/moditect/jfrunit/tree/build-jdk-17 but I'm not 100% sure this can be a solution. changes |
I changed the I've thought the problem was related to the unsupported JDK version on that plugin.
Here, I have no idea of the next step :). I'll try the solution by @Croway. I've also tried to set that args to the compiler, but I didn't find the right way. BTW, I can build the project when using the JDK17 along with java.version=16. [EDIT] I found that the extra-enforcer-rules v1.4 should support the JDK 17.
and I have added this plugin definition in the jfr-aggregator pom file <plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules combine.children="override">
<requireMavenVersion>
<version>${maven.version}</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${java.version}</version>
</requireJavaVersion>
<enforceBytecodeVersion>
<maxJdkVersion>${java.version}</maxJdkVersion>
</enforceBytecodeVersion>
<dependencyConvergence/>
<requireUpperBoundDeps/>
</rules>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>${version.extra.enforcer.rules}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin> |
@danieledipompeo interesting, I tried it and it works, much more elegant compared to play with modules 😄 I came up with https://github.com/moditect/jfrunit/tree/add-extra-enforcer-rules-dep , too bad there are many dependency in quarkus that let the enforcer fail, that's why I had to add OT, @danieledipompeo I see you are in Aquila, are you from Abruzzo? actually I'm from Pescara |
@Croway yes I'm from L'Aquila :) I'll prepare the PR in the next few days, I'll keep you posted |
Hi guys,
I got the following error while trying to build with
openjdk 17 2021-09-14
I also read the #39, but I didn't understand the solution :)
Could you explain to me how to build jfr?
Do I need to set some "special" configuration to my JDK?
Cheers
Daniele
The text was updated successfully, but these errors were encountered: