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
When using a `java_proto_library` as a dependency of a `java_export`
the generated jar contains classes from protobuf, which is
unexpected. This PR allows users to specify a list of workspaces to
be excluded from the generated jar, and that allows us to filter the
class files generated by these aspects.
Extends `java_library` to allow maven artifacts to be uploaded.
@@ -105,6 +106,7 @@ Generated rules:
105
106
| <aid="java_export-name"></a>name | A unique name for this target | none |
106
107
| <aid="java_export-maven_coordinates"></a>maven_coordinates | The maven coordinates for this target. | none |
107
108
| <aid="java_export-deploy_env"></a>deploy_env | A list of labels of Java targets to exclude from the generated jar. [<code>java_binary</code>](https://bazel.build/reference/be/java#java_binary) targets are *not* supported. | <code>[]</code> |
109
+
| <aid="java_export-excluded_workspaces"></a>excluded_workspaces | A dict of strings representing the workspace names of artifacts that should not be included in the maven jar to a <code>Label</code> pointing to the dependency that workspace should be replaced by, or <code>None</code> if the exclusion shouldn't be replaced with an extra dependency. | <code>{"com_google_protobuf": None}</code> |
108
110
| <aid="java_export-pom_template"></a>pom_template | The template to be used for the pom.xml file. | <code>None</code> |
109
111
| <aid="java_export-visibility"></a>visibility | The visibility of the target | <code>None</code> |
doc="Mapping of `Label`s to the excluded workspace names. Note that this must match the values passed to the `pom_file` rule so the `pom.xml` correctly lists these dependencies.",
177
+
allow_empty=True,
178
+
providers= [
179
+
[JavaInfo],
180
+
],
181
+
),
136
182
# Bazel's own singlejar doesn't respect java service files,
0 commit comments