Skip to content
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

Explicit marking of maven junit targets as test only cause issues in downstream targets #10

Open
gkdn opened this issue Mar 1, 2025 · 0 comments

Comments

@gkdn
Copy link

gkdn commented Mar 1, 2025

bazel_worker_java defines junit maven.artifacts via explicitly marking them as testonly.

However there are projects out there that define a dependency to junit via their pom but they are not test only targets. As a result, depending on bazel-worker-java breaks the build in such cases.

For example:
https://github.com/javacc/javacc/blob/d1e39b60908fb6c6cd5b7c278cca63324a46eee8/pom.xml#L165

I think it would be more appropriate to mark test-only targets via repo aliases instead of directly on maven.install.

On the other side, these targets should have been probably also marked as devonly.

@gkdn gkdn changed the title Explicit marking of maven junit targets cause issues in downstream targets Explicit marking of maven junit targets as test only cause issues in downstream targets Mar 1, 2025
copybara-service bot pushed a commit to google/j2cl that referenced this issue Mar 3, 2025
This helper provides additional features like GC and worker multiplexing - though they are not yet enabled in this CL.

CL is temporarily forking the files until bazel_worker_java could be added as a dep for repo:
bazelbuild/bazel-worker-api#10

PiperOrigin-RevId: 733024990
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

No branches or pull requests

1 participant