You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tldr
the Surefire test runner fails with java.lang.NoClassDefFoundError: shaded_package/org/hamcrest/SelfDescribing after upgrading only firebase-admin from 9.3.0 to 9.4.0. I suspect it might be related to a wrongly scoped dependency (see #1016).
git clone https://github.com/fatso83/issue-reproductions
cd issue-reproductions/noclassdeffound_shaded_package
mvn test
The result is that the Surefire test runner fails with java.lang.NoClassDefFoundError: shaded_package/org/hamcrest/SelfDescribing. The same thing happens if running in IntelliJ. I found that this is caused by me upgrading firebase-admin from version 9.3.0 to 9.4.0. If I change that dependency to 9.3.0 the issue goes away.
Relevant Code:
See above issue. A single unit test class is enough to show the issue.
Suspect: incorrect test dependency
I browsed the repo and found #1016. That is a likely candidate for how this could occur, if it pulls in shaded versions of Junit or Hamcrest.
The text was updated successfully, but these errors were encountered:
tldr
the Surefire test runner fails with
java.lang.NoClassDefFoundError: shaded_package/org/hamcrest/SelfDescribing
after upgrading only firebase-admin from 9.3.0 to 9.4.0. I suspect it might be related to a wrongly scoped dependency (see #1016).Env info (OS, library versions)
Steps to reproduce:
I created a minimally reproducible testcase, which can be run like this:
The result is that the Surefire test runner fails with
java.lang.NoClassDefFoundError: shaded_package/org/hamcrest/SelfDescribing
. The same thing happens if running in IntelliJ. I found that this is caused by me upgradingfirebase-admin
from version 9.3.0 to 9.4.0. If I change that dependency to 9.3.0 the issue goes away.Relevant Code:
See above issue. A single unit test class is enough to show the issue.
Suspect: incorrect test dependency
I browsed the repo and found #1016. That is a likely candidate for how this could occur, if it pulls in shaded versions of Junit or Hamcrest.
The text was updated successfully, but these errors were encountered: