-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to use JUnit 5 and Java 10 in Maven with the confilcting maven-surefire-plugin and org.ow2.asm #1409
Comments
If I traced the call stack correctly, Surefire/Plexus was compiled with Somehow, you have to ensure Surefire/Plexus uses the new ASM version too. Which |
@Tibor17 Surefire (master, HEAD) refers to |
@sormuras surefile.version = 2.21.0 and asm.version = 6.1.1, all latest... |
Mh, perhaps repeat the |
@sormuras What's your point? I AM USING the latest version of |
@sormuras |
...and like the You patched the I'm not sure if it works, though. |
@CasterKKK <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefile.version}</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version> <!-- Use newer version of ASM -->
</dependency>
</dependencies>
</plugin> |
@CasterKKK |
@Tibor17 maven.version = 3.5.3
But in fact, I have several tests in And the report is:
And:
|
@CasterKKK |
@CasterKKK |
@Tibor17 |
Which |
|
Like shown in the |
@sormuras |
Looks like that, aye. |
In fact, the problem is I didn't add:
After adding that everything is fine, thank you guys! |
fyi, https://issues.apache.org/jira/browse/SUREFIRE-1518 was created to update |
In my project I try to use Java 10 with Junit 5, but something interesting occurs.
Background
To make maven work well under Java 10, we need to change the asm library of
maven-compiler-plugin
toorg.ow2.asm
. And to make Junit 5 work well under Java 10, we needmaven-surefire-plugin
. Here is theplugin
part of mypom.xml
.And when I run run maven's test command in Idea, everything is fine.
But when I run
mvn test -f pom.xml -e
on the root dir, it gives a error:The
java.lang.IllegalArgumentException
atorg.objectweb.asm.ClassReader
is really weird, maybeorg.ow2.asm
is not compatible withmaven-surefire-plugin
?Do you guys have any solution? I won't change Java 10 and Junit 5 for some reasons, so don't let me change to Java 8, THX!
The text was updated successfully, but these errors were encountered: