1

The Bazel java_binary rule has an implicit output target of name_deploy.jar, which includes all dependencies into the jar. However, I'd like to include some but not all of the dependencies inside the jar.

Is there a way to specify some dependencies but not others to be embedded?

I've looked through the other options but none of them look like they were designed for this. I also asked this question to see if there's a way to observe what the implicit rule is doing.

merlin2011
  • 71,677
  • 44
  • 195
  • 329

1 Answers1

0

The deploy_env attribute of java_binary allows the dependencies of another java_binary target to be removed from the runtime class path and deploy jar.

Benjamin Peterson
  • 19,297
  • 6
  • 32
  • 39