-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes bug #421 - Run Testerra as part of fat jar standalone application #422
Fixes bug #421 - Run Testerra as part of fat jar standalone application #422
Conversation
…ons of AbstractModule that does not fullfill package class will be instantiated.
Hi @erickubenka, thanks for your fix! But can you explain why |
Hey @martingrossmann, to be honest, I don't get it either. When debugging the Main class with IntelliJ and investigating the scanned classes everything looks good, but in a built fat jar somehow it seems not be working as intented without that additional filter. May something is different then in how classes are loaded or the ClassLoader is built in general. So, i just don't get it and had spent a lot hours the past days to find out if I was doing something wrong when packaging the jar. But as it happens with default skeleton project as well, I just tried to find out how I can fix it. |
@erickubenka I build a new snapshot version |
So i took the testerra-skeletons project, upgraded my dependencies to 2.8-SNAPSHOT and things worked well. For openjdk-11, which i run in a docker container, everything worked well. For openjdk-17, I ran into the following error, but was able to handle it by allowing deep reflections with new jvm option So for openjdk-17 command looks like this:
And just for completion, the error that I ran into when executing fat jar without
So thanks for the fast update and the provided SNAPSHOT version. |
Description
Fixes bug #421 by apply a package filter to avoid implementations of
com.google.inject.AbstractModule
that does not fullfill package class will be instantiated.Concrete class of the fat jar that will force this error is
com.google.inject.util.Modules$OverrideModule
.Before this fix Testerra tried to invoke the following implementations of
AbstractModule
inside the fat jar:After this fix Testerra tried to invoke the following implemenation like intended:
Fixes #421
Type of change
Please delete options that are not relevant.
Checklist: