You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Václav Haisman (Jira)" <ji...@apache.org> on 2022/10/21 18:20:00 UTC

[jira] [Commented] (SUREFIRE-2121) Failed to parse version of junit:junit: 4.13.2

    [ https://issues.apache.org/jira/browse/SUREFIRE-2121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17622401#comment-17622401 ] 

Václav Haisman commented on SUREFIRE-2121:
------------------------------------------

OK. I was too quick. It fixes the test for me but it breaks other parts of surefire because of API changes in Jupiter Engine. I am not sure I know how to deal with those.

> Failed to parse version of junit:junit: 4.13.2
> ----------------------------------------------
>
>                 Key: SUREFIRE-2121
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2121
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 5.x support
>    Affects Versions: 3.0.0-M7
>            Reporter: Václav Haisman
>            Priority: Major
>              Labels: patch, pull-request-available
>
> I am getting the following error in some of my projects:
> {code}
> WARNING: TestEngine with ID 'junit-vintage' failed to discover tests
> org.junit.platform.commons.JUnitException: Failed to parse version of junit:junit: 4.13.2
>         at org.junit.vintage.engine.JUnit4VersionCheck.parseVersion(JUnit4VersionCheck.java:54)
>         at org.junit.vintage.engine.JUnit4VersionCheck.checkSupported(JUnit4VersionCheck.java:37)
>         at org.junit.vintage.engine.JUnit4VersionCheck.checkSupported(JUnit4VersionCheck.java:32)
>         at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:61)
>         at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:177)
>         at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:164)
>         at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:120)
>         at org.apache.maven.surefire.junitplatform.LazyLauncher.discover(LazyLauncher.java:48)
>         at org.apache.maven.surefire.junitplatform.TestPlanScannerFilter.accept(TestPlanScannerFilter.java:56)
>         at org.apache.maven.surefire.api.util.DefaultScanResult.applyFilter(DefaultScanResult.java:102)
>         at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.scanClasspath(JUnitPlatformProvider.java:167)
>         at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:139)
>         at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
>         at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
>         at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
>         at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)
>  {code}
> I was able to reproduce this issue with the surefire-1585-junit4-vintage-it test when junit that it uses is upgraded to 4.13.2. The fix is to update JUnit5 Vintage engine.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)