Junit5: Compile and test on Java 9

Created on 6 Apr 2017  路  19Comments  路  Source: junit-team/junit5

Moved "Lessons learned..." to Wiki

Lessons learned "JUnit 5 compile and test on Java 9 b162"

Here, only the remaining technical steps resulting from the lessons learned are retained.

Related Issues

  • #425 _"Test against JDK 9 modules"_
  • #1951 _"Java 12"_

Deliverables

Java 9+10+11... build

Most helpful comment

@marcphilipp I'm going to publish it tonight when I get home.

All 19 comments

I'm curious as to why build warnings should not be treated as errors.

How long should they not be treated as errors, if it's just a temporary measure?

It's just a temporary measure to not break the build at https://travis-ci.org/junit-team/junit5/builds/219251561#L752 ... which should use AccessibleObject.canAccess as soon as we switch to Java 9.

@sormuras, thanks for compiling all of this information! 馃憤

FYI: the Shadow plugin has already been upgraded to ASM 5.2: https://github.com/johnrengelman/shadow/issues/285

Why not just suppress deprecation warnings on the call for now?

Or... would that mess up the JDK 8 build? 馃槣

It'll also be nice to be able to switch to trySetAccessible(), but we'll have to wait until JUnit 6 for that probably.

Alternatively to waiting for JUnit 6, we might be able to use MR-JAR support coming with Java 9, once we have a clear picture of how MR-JARs fit into Gradle. :)

Alternatively to waiting for JUnit 6, we might be able to use MR-JAR support coming with Java 9, once we have a clear picture of how MR-JARs fit into Gradle. :)

Ummmm... yeah... once we can actually (reliably) develop against Java 9 with the whole tool chain (Gradle, all CI servers, IDEs, etc.). So, I'm not going to hold my breath for that at the moment.

Of course.

I would be happy to help on that as soon you wanted to start on this issue...

http://mailman.qos.ch/pipermail/announce/2017/000146.html

Ceki just released SLF4J version 1.8.0-alpha0, modularized for Java9/Jigsaw/JPMS/JSR 376, on Maven Central. Let's have look how he did.

All three open ends are still not resolvable:

@sormuras AssertJ 3.7.0 should be released in a week or so.

Thanks for the information, Joel! 馃憤

@johnrengelman Are there any updates regarding Shadow 2.0.0?

@marcphilipp I'm going to publish it tonight when I get home.

Was this page helpful?
0 / 5 - 0 ratings