[
https://issues.apache.org/jira/browse/SUREFIRE-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tibor Digana updated SUREFIRE-1680:
-----------------------------------
Fix Version/s: 3.0.0-M4
> Startup exception ClassNotFoundException of StartupReportConfiguration with
> module-info.java
> --------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-1680
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1680
> Project: Maven Surefire
> Issue Type: Bug
> Components: classloading, Maven Surefire Plugin
> Affects Versions: 2.22.2, 3.0.0-M3
> Environment: $ java -version
> java version "12.0.1" 2019-04-16
> Java(TM) SE Runtime Environment (build 12.0.1+12)
> Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
> $ mvn -version # 3.6.0 or above required for JDK12
> Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555;
> 2019-04-04T13:00:29-06:00)
> Maven home: C:\Apps\maven\apache-maven-3.6.1
> Java version: 12.0.1, vendor: Oracle Corporation, runtime: C:\Program
> Files\Java\12
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> Reporter: Roy Williams
> Assignee: Tibor Digana
> Priority: Major
> Fix For: 3.0.0-M4
>
> Attachments: SurefireStartupIssue.zip, build.out.txt
>
>
> As surefire-plugin is starting up during the build it crashes out with a
> series of exceptions. The junit tests are not performed. Tracing through
> the attached build.out.txt (see attachments) suggests the
> ClassNotFoundException is a result of a SurefireReflectionException. Not
> sure if my interpretation is accurate.
> This started occurring on my application upon migrating from JDK8 to JDK12.
> I have a purpose for their 'jlink' tool. JDK12 is the target delivery
> vehicle.
> A project zip is attached that contains one Main.class and files required to
> build it. It is a dirt simple reproduction of my problem.
> I am hoping that someone on the surefire team can unzip it and try to
> reproduce my issue.
> If the <skipTests> flag is set to true, the little toy executable will
> actually build up and can be executed on the command line. Proves that JDK
> is able to handle its modules correctly. It can be run by unzipping the
> distribution assembly and run with the command ...
> cd target; unzip SurefireStartupIssue-dist.zip; cd SurefireStartupIssue
> java --module-path '.;lib' -m
> SurefireStartupIssue/com.samplebiz.surefirestartupissue.Main
>
> Crude workaround (temporarily disable Java Modules):
> # Rename your ‘module-info.java’ file <tempfile>.
> # Make surefire configuration has <skipTests>false</skipTests>
> # Run tests… all should pass.
> # When done with tests, restore ‘module-info.java to enable Java modules.
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)