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
Running the application using the Gradle run command follows the conventions set forth by Gradle regarding dependency resolution and classpath order.
It's generally not a good practice to expect certain JARs to be loaded first than orders, as classpath order can't be explicitly guaranteed. Overriding a class definition with another in a different JAR is often times a brittle solution.
May I suggest a different approach to provide an alternative behavior? You may try using ServiceLoader or another pluggable mechanism to select the correct implementation. You may even use the dependency injection container for this matter.
It looks like the classpath order is wrong when running the application.
Example:
I have a class "MyClass" which also exist in "Dependency.jar".
When running the application I expect that my own "MyClass" will override MyClass in Dependency.jar but instead, MyClass from Dependency.jar is used.
This was tested in 0.4.0
The text was updated successfully, but these errors were encountered: