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
We are hitting an issue similar to #1402. We are creating a set of libraries for our organization and we want something like this:
Define a header library
Add multiple implementations for the header to support different frameworks. This is similar to this.
We want the dependencies for these to be available during compilation like this, but we don't want to be attached to the library's jar.
#1402 mentions how to do something similar with java_binary, but we need this at the java_library level.
You might ask us why not have these implementations in two different java_librarys. We can't do that right now as that breaks backwards compatibility for our current implementations. Currently our libs are tightly coupled to a single framework and we are trying to remove this coupling while maintaining backwards compatibility. This is to allow our application owners to migrate at their own pace.
So my question is, can we do the Maven's scope=provided equivalent in a java_library?
The text was updated successfully, but these errors were encountered:
See also this similar feature request that was rejected.
It worth noting, that there is a way to achieve dependency exclusion using deploy_env attribute in java_binary rule. See for example Gerrit Code Review code base how it could be used.
The semantics of scope=provided for a java_library does not make sense to me. I concur with the decision in #1402 to use java_binary and deploy_env if absolutely needed.
We are hitting an issue similar to #1402. We are creating a set of libraries for our organization and we want something like this:
#1402 mentions how to do something similar with
java_binary
, but we need this at thejava_library
level.You might ask us why not have these implementations in two different
java_library
s. We can't do that right now as that breaks backwards compatibility for our current implementations. Currently our libs are tightly coupled to a single framework and we are trying to remove this coupling while maintaining backwards compatibility. This is to allow our application owners to migrate at their own pace.So my question is, can we do the Maven's
scope=provided
equivalent in ajava_library
?The text was updated successfully, but these errors were encountered: