You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/07/15 08:22:00 UTC
[jira] [Commented] (SUREFIRE-2251) [REGRESSION] java.lang.NoSuchMethodException: org.apache.maven.plugin.surefire.StartupReportConfiguration.
[ https://issues.apache.org/jira/browse/SUREFIRE-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865939#comment-17865939 ]
ASF GitHub Bot commented on SUREFIRE-2251:
------------------------------------------
michael-o opened a new pull request, #761:
URL: https://github.com/apache/maven-surefire/pull/761
…che.maven.plugin.surefire.StartupReportConfiguration.<init>
This closes #761
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SUREFIRE) filed
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] Format the pull request title like `[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles`,
where you replace `SUREFIRE-XXX` with the appropriate JIRA issue. Best practice
is to use the JIRA issue title in the pull request title and in the first line of the
commit message.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will
be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its clean install`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
> [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)