Skip to content

Make java library earlier on classpath #1752

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fzakaria
Copy link

@fzakaria fzakaria commented Jul 8, 2025

Description

I have a scala_library with some java files where I would like to override the class for a particular dependency (i.e. something from @maven//).

This is a common idiom for monkey patching some functionality.

In order for this to work, the Java file needs to be first on the classpath.
@rules_scala seems to be placing the generated java_library at the end of the CLASSPATH.

This change makes it so that it's first.

@fzakaria fzakaria requested review from liucijus and simuons as code owners July 8, 2025 22:18
@fzakaria
Copy link
Author

fzakaria commented Jul 8, 2025

This patch properly lets me override the Java files of my Maven dependencies from my scala_library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant