-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Uberjar does not include add dependencies #9068
Comments
I don't think this is a bug TBH. You haven't added Guava to your |
@geoand I agree, but then it should fail in the dev mode, right? My problem is not that it does not work, my problem is that the behavior is different depending how I start it up, |
Right, ideally it should. Problem is that devmode has some dependencies of it's own that are being picked up in this case. |
@oscarfh Thank you for volunteeting. The best person to help you out and / or coordinate efforts is @aloubyansky who has steadily been improving our Gradle support with difficult to make fixes. |
Ideally, it should simply fail to build. And even compile. The IDE should be highlighting this as a missing dependency. I think we should review our IDE launcher implementation to avoid this kind of issues. It enables not only guava but all sorts of other dependencies during development that won't be there at runtime. |
The only real option here would be to shade all the IDE launcher dependencies, although we will need to be careful about which ones to shade. |
+1 for shading to avoid such issues |
Describe the bug
This is a project created from code.quarkus.io and configured to generate a uber jar and to use
com.google.common.base.Strings
class.It will work if ran from maven (
./mvn quarkus:dev
), but not from the uber jar (java -jar ...
) due to a missing dependency (the above mentioned class)Expected behavior
Both should run.
Actual behavior
Only the maven version runs, because the development version seems to get this class from the dependency
quarkus-ide-launcher-1.4.1.Final.jar
.It can be even worse, is case the version executed in dev is different than the one executed on the environment.
To Reproduce
Steps to reproduce the behavior:
http://localhost:8080/hello
worksThe text was updated successfully, but these errors were encountered: