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

Andreas Höhmann edited comment on SUREFIRE-2251 at 7/16/24 7:02 AM:
--------------------------------------------------------------------

I found something. With that additional dependency for the surefire-plugin it 
crashs. Without everything is normal: 3.3.1. and 3.3.2-SNAPSHOT.

{code:xml}
<dependency>
  <groupId>me.fabriciorby</groupId>
  <artifactId>maven-surefire-junit5-tree-reporter</artifactId>
  <version>1.2.1</version>
</dependency>
{code}

I will try to reproduce the error with a fork of that tree-reporter

https://github.com/ahoehma/maven-surefire-junit5-tree-reporter

I guess when I change the surefire version from 3.1.0 to 3.3.1 something should 
happens :)


was (Author: hoehmi):
I found something. With that additional dependency for the surefire-plugin it 
crashs. Without everything is normal: 3.3.1. and 3.3.2-SNAPSHOT.

{code:xml}
<dependency>
  <groupId>me.fabriciorby</groupId>
  <artifactId>maven-surefire-junit5-tree-reporter</artifactId>
  <version>1.2.1</version>
</dependency>
{code}

> [REGRESSION] java.lang.NoSuchMethodException: 
> org.apache.maven.plugin.surefire.StartupReportConfiguration.<init>
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-2251
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2251
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>            Reporter: Andreas Höhmann
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.3.2
>
>
> I try to update from 3.3.0 to 3.3.1 and see some breaking changes because of 
> missing constructors.
> {noformat}
> 115121 [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-surefire-plugin:3.3.1:test (default-test) on 
> project util: Execution default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:3.3.1:test failed: 
> java.lang.NoSuchMethodException: 
> org.apache.maven.plugin.surefire.StartupReportConfiguration.<init>(boolean,boolean,java.lang.String,boolean,java.io.File,boolean,java.lang.String,java.io.File,boolean,int,java.lang.String,java.lang.String,boolean,boolean,boolean,org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter,org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter,org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter)
>  -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-surefire-plugin:3.3.1:test (default-test) 
> on project util: Execution default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:3.3.1:test failed: 
> java.lang.NoSuchMethodException: 
> org.apache.maven.plugin.surefire.StartupReportConfiguration.<init>(boolean,boolean,java.lang.String,boolean,java.io.File,boolean,java.lang.String,java.io.File,boolean,int,java.lang.String,java.lang.String,boolean,boolean,boolean,org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter,org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter,org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
> (MojoExecutor.java:333)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:316)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:212)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:174)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
> (MojoExecutor.java:75)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
> (MojoExecutor.java:162)
>     at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute 
> (BuildCacheMojosExecutionStrategy.java:145)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
>     at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject 
> (SmartBuilderImpl.java:206)
>     at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run 
> (SmartBuilderImpl.java:71)
>     at java.util.concurrent.Executors$RunnableAdapter.call 
> (Executors.java:539)
>     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker 
> (ThreadPoolExecutor.java:1136)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:635)
>     at java.lang.Thread.run (Thread.java:840)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
> default-test of goal 
> org.apache.maven.plugins:maven-surefire-plugin:3.3.1:test failed: 
> java.lang.NoSuchMethodException: 
> org.apache.maven.plugin.surefire.StartupReportConfiguration.<init>(boolean,boolean,java.lang.String,boolean,java.io.File,boolean,java.lang.String,java.io.File,boolean,int,java.lang.String,java.lang.String,boolean,boolean,boolean,org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter,org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter,org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:133)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
> (MojoExecutor.java:328)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:316)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:212)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:174)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
> (MojoExecutor.java:75)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
> (MojoExecutor.java:162)
>     at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute 
> (BuildCacheMojosExecutionStrategy.java:145)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
>     at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject 
> (SmartBuilderImpl.java:206)
>     at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run 
> (SmartBuilderImpl.java:71)
>     at java.util.concurrent.Executors$RunnableAdapter.call 
> (Executors.java:539)
>     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker 
> (ThreadPoolExecutor.java:1136)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:635)
>     at java.lang.Thread.run (Thread.java:840)
> Caused by: org.apache.maven.surefire.api.util.SurefireReflectionException: 
> java.lang.NoSuchMethodException: 
> org.apache.maven.plugin.surefire.StartupReportConfiguration.<init>(boolean,boolean,java.lang.String,boolean,java.io.File,boolean,java.lang.String,java.io.File,boolean,int,java.lang.String,java.lang.String,boolean,boolean,boolean,org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter,org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter,org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter)
>     at org.apache.maven.surefire.api.util.ReflectionUtils.getConstructor 
> (ReflectionUtils.java:69)
>     at 
> org.apache.maven.plugin.surefire.CommonReflector.createStartupReportConfiguration
>  (CommonReflector.java:74)
>     at 
> org.apache.maven.plugin.surefire.CommonReflector.createReportingReporterFactory
>  (CommonReflector.java:67)
>     at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.getSuitesIterator 
> (ForkStarter.java:671)
>     at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet
>  (ForkStarter.java:385)
>     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run 
> (ForkStarter.java:297)
>     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run 
> (ForkStarter.java:250)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider 
> (AbstractSurefireMojo.java:1256)
>     at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked
>  (AbstractSurefireMojo.java:1105)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute 
> (AbstractSurefireMojo.java:939)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:126)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
> (MojoExecutor.java:328)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:316)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:212)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:174)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
> (MojoExecutor.java:75)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
> (MojoExecutor.java:162)
>     at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute 
> (BuildCacheMojosExecutionStrategy.java:145)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
>     at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject 
> (SmartBuilderImpl.java:206)
>     at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run 
> (SmartBuilderImpl.java:71)
>     at java.util.concurrent.Executors$RunnableAdapter.call 
> (Executors.java:539)
>     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker 
> (ThreadPoolExecutor.java:1136)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:635)
>     at java.lang.Thread.run (Thread.java:840)
> Caused by: java.lang.NoSuchMethodException: 
> org.apache.maven.plugin.surefire.StartupReportConfiguration.<init>(boolean,boolean,java.lang.String,boolean,java.io.File,boolean,java.lang.String,java.io.File,boolean,int,java.lang.String,java.lang.String,boolean,boolean,boolean,org.apache.maven.plugin.surefire.extensions.SurefireStatelessReporter,org.apache.maven.plugin.surefire.extensions.SurefireConsoleOutputReporter,org.apache.maven.plugin.surefire.extensions.SurefireStatelessTestsetInfoReporter)
>     at java.lang.Class.getConstructor0 (Class.java:3585)
>     at java.lang.Class.getConstructor (Class.java:2271)
>     at org.apache.maven.surefire.api.util.ReflectionUtils.getConstructor 
> (ReflectionUtils.java:67)
>     at 
> org.apache.maven.plugin.surefire.CommonReflector.createStartupReportConfiguration
>  (CommonReflector.java:74)
>     at 
> org.apache.maven.plugin.surefire.CommonReflector.createReportingReporterFactory
>  (CommonReflector.java:67)
>     at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.getSuitesIterator 
> (ForkStarter.java:671)
>     at 
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet
>  (ForkStarter.java:385)
>     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run 
> (ForkStarter.java:297)
>     at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run 
> (ForkStarter.java:250)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider 
> (AbstractSurefireMojo.java:1256)
>     at 
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked
>  (AbstractSurefireMojo.java:1105)
>     at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute 
> (AbstractSurefireMojo.java:939)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:126)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
> (MojoExecutor.java:328)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
> (MojoExecutor.java:316)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:212)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:174)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 
> (MojoExecutor.java:75)
>     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run 
> (MojoExecutor.java:162)
>     at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute 
> (BuildCacheMojosExecutionStrategy.java:145)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
>     at io.takari.maven.builder.smart.SmartBuilderImpl.buildProject 
> (SmartBuilderImpl.java:206)
>     at io.takari.maven.builder.smart.SmartBuilderImpl$ProjectBuildTask.run 
> (SmartBuilderImpl.java:71)
>     at java.util.concurrent.Executors$RunnableAdapter.call 
> (Executors.java:539)
>     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker 
> (ThreadPoolExecutor.java:1136)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:635)
>     at java.lang.Thread.run (Thread.java:840)
> {noformat}
> That's my plugin definition:
> {code:xml}
> <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <version>${maven-surefire-plugin.version}</version>
>           <configuration>
>             <!-- @formatter:off Avoid newlines inside argLine! -->
>             <!-- Sets the VM argument line used when unit tests are run. See 
> jacoco plugin -->
>             <argLine>-Xshare:off 
> -Djdk.net.URLClassPath.disableClassPathURLCheck=true 
> @{jacoco.surefireArgLine}</argLine>
>             <!-- @formatter:on Avoid newlines inside argLine! -->
>             <printSummary>true</printSummary>
>             <useUnlimitedThreads>false</useUnlimitedThreads>
>             <perCoreThreadCount>false</perCoreThreadCount>
>             <parallelOptimized>false</parallelOptimized>
>             <threadCount>${test-thread-count}</threadCount>
>             <parallel>${test-parallel}</parallel>
>             <forkCount>${test-fork-count}</forkCount>
>             <reuseForks>${test-fork-reuse}</reuseForks>
>             
> <rerunFailingTestsCount>${test-rerun-count}</rerunFailingTestsCount>
>             
> <skipAfterFailureCount>${test-skip-after-failure-count}</skipAfterFailureCount>
>             
> <parallelTestsTimeoutForcedInSeconds>400</parallelTestsTimeoutForcedInSeconds>
>             <parallelTestsTimeoutInSeconds>400</parallelTestsTimeoutInSeconds>
>             <properties>
>               <property>
>                 <name>dataproviderthreadcount</name>
>                 <value>${test-testng-dataproviderthreadcount}</value>
>               </property>
>             </properties>
>           </configuration>
>           <executions>
>             <execution>
>               <id>default-test</id>
>               <phase>test</phase>
>               <goals>
>                 <goal>test</goal>
>               </goals>
>               <configuration>
>                 <includes>
>                   <include>${test-includes}</include>
>                 </includes>
>                 <reportFormat>plain</reportFormat>
>                 <consoleOutputReporter>
>                   <disable>true</disable>
>                 </consoleOutputReporter>
>                 <statelessTestsetInfoReporter 
> implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
>                   <theme>ASCII</theme>
>                   <printStacktraceOnError>true</printStacktraceOnError>
>                   <printStacktraceOnFailure>true</printStacktraceOnFailure>
>                   <printStdoutOnError>true</printStdoutOnError>
>                   <printStdoutOnFailure>true</printStdoutOnFailure>
>                   <printStdoutOnSuccess>false</printStdoutOnSuccess>
>                   <printStderrOnError>true</printStderrOnError>
>                   <printStderrOnFailure>true</printStderrOnFailure>
>                   <printStderrOnSuccess>false</printStderrOnSuccess>
>                 </statelessTestsetInfoReporter>
>               </configuration>
>             </execution>
>           </executions>
>           <dependencies>
>             <dependency>
>               <groupId>org.junit.jupiter</groupId>
>               <artifactId>junit-jupiter-engine</artifactId>
>               <version>${junit-jupiter-engine.version}</version>
>             </dependency>
>             <dependency>
>               <groupId>me.fabriciorby</groupId>
>               <artifactId>maven-surefire-junit5-tree-reporter</artifactId>
>               <version>1.2.1</version>
>             </dependency>
>           </dependencies>
>         </plugin>
> {code}
> {code:xml}
> <properties>
>     <maven-surefire-plugin.version>3.3.0</maven-surefire-plugin.version>
>     <junit-jupiter-engine.version>5.10.3</junit-jupiter-engine.version>
>     <jacoco.surefireArgLine />
>     <test-includes>**/*Test.java</test-includes>
>     <test-parallel>classes</test-parallel>
>     <test-thread-count>1</test-thread-count>
>     <test-fork-count>2</test-fork-count>
>     <test-fork-reuse>false</test-fork-reuse>
>     
> <test-testng-dataproviderthreadcount>1</test-testng-dataproviderthreadcount>
>     <test-rerun-count>1</test-rerun-count>
>     <test-skip-after-failure-count>0</test-skip-after-failure-count>
> </properties>
> {code}
> It's maybe because of this additional reporter? 
> https://github.com/fabriciorby/maven-surefire-junit5-tree-reporter/issues/52



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

Reply via email to