https://bugzilla.redhat.com/show_bug.cgi?id=1981486
Bug ID: 1981486
Summary: Forked test fails with InvocationTargetException:
org.apache.commons.lang3.StringUtils
Product: Fedora
Version: rawhide
Status: NEW
Component: maven-surefire
Assignee: mizdebsk(a)redhat.com
Reporter: sgehwolf(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: dbhole(a)redhat.com, jaromir.capik(a)email.cz,
java-maint-sig(a)lists.fedoraproject.org,
java-sig-commits(a)lists.fedoraproject.org,
mizdebsk(a)redhat.com, sochotni(a)redhat.com
Target Milestone: ---
Classification: Fedora
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.
--
You are receiving this mail because:
You are on the CC list for the bug.