Description of problem: surefire tests which fork a new JVM fail with InvocationTargetException: org.apache.commons.lang3.StringUtils error. The same doesn't happen for non-forked tests. Version-Release number of selected component (if applicable): # rpm -q maven-surefire maven-surefire-3.0.0~M4-2.fc35.noarch How reproducible: 100% Steps to Reproduce: 1. $ fedpkg clone jdependency && cd jdependency 2. $ fedpkg build jdependency Actual results: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project jdependency: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test failed: java.lang.reflect.InvocationTargetException: org/apache/commons/lang3/StringUtils: org.apache.commons.lang3.StringUtils -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.tz78Kh (%build) Bad exit status from /var/tmp/rpm-tmp.tz78Kh (%build) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 600, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/jdependency.spec Expected results: commons-lang3 dependency is added to default classpath of forked JVMs as clearly those classes are needed. A work-around is to add the dep to the configuration of maven-surefire settings in the pom, but this doesn't scale.
Example scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=71771100
Example of said work-around: https://src.fedoraproject.org/rpms/jigawatts/blob/rawhide/f/jigawatts.spec#_57
The jol package failed its tests during the mass rebuild for the same reason.
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle. Changing version to 35.
This is caused by downstream patch for unbundling of commons-lang3.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
The issue should be fixed in Fedora rawhide in Maven Surefire 3.0.0~M6 I've created regression test for this bug: https://src.fedoraproject.org/rpms/maven-surefire/pull-request/5 On Fedora 35 the test failed as expected due to missing commons-lang3: https://artifacts.dev.testing-farm.io/fe101f9e-aec6-4dd6-ab8e-420ffb358b86/ On Fedora 37 the test succeeded: https://artifacts.dev.testing-farm.io/a54c3bcb-477d-4248-8136-9662c9b2d87e/ Therefore I believe the bug should be fixed in rawhide and I'm closing it.