-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Reverse order of classpath to allow patching #777
Comments
Hi @tobad357 , thanks for the suggestion! This definitely sounds like a useful feature and we will have this patched for the next version release ( |
Hi @tobad357 , we have reversed the classpath order in version |
Thanks for fixing this issue - I can confirm the change fixed a similar problem I was having (I guess there are many jars out there specifying a file However, I notice that now the order is resources -> classes -> libs. While there's no official standard, from what I understand, it's more conventional to do classes -> resources -> libs. I've confirmed that this is the order the Gradle |
Hi @anuraaga thanks for the tip! We were thinking to keep |
I think your reasoning makes sense @coollog. |
Agreed, I think we gain more here the way we currently have it vs following convention. |
Closing unless any objections to keeping it the way it is. |
Feel free to keep this closed :) Just want to ask for one more thought though. Currently, this means that users could see different behavior when using gradle's I think it can be very surprising to users to see different behavior for |
Although the Maven |
Description of the issue:
Overriding dependency classes is impossible due to classpath order when generating
startup command.
Sometimes it is necessary to patch a class in the dependencies.
To get this to work the classpath would need to load application classes first and then
lib classpath
Current Entrypoint
ENTRYPOINT ["java","-Xms512m","-Xdebug","--spring.config.name","${APP_NAME}","--spring.config.location","${CONFIG_FILES}","-cp","/app/libs/*:/app/resources/:/app/classes/","com.app.AppStart"]
Expected behavior:
The app classes dir would be first in the classpath
ENTRYPOINT ["java","-Xms512m","-Xdebug","--spring.config.name","${APP_NAME}","--spring.config.location","${CONFIG_FILES}","-cp","/app/resources/:/app/classes/:/app/libs/*","com.app.AppStart"]
Steps to reproduce:
Environment: gradle
The text was updated successfully, but these errors were encountered: