Open lolski opened 2 years ago
However, some Bazel targets are intentionally not given Maven coordinates if they are meant to be compiled upwards into a single top-level Bazel target as a single fat JAR.
Client Java, for instance, uses this fat JAR approach in order to make it easy for our users to include it as a dependency in their program, ie., they only need to declare one dependency instead of multiple in their pom.xml
.
My proposal is to only depend on JARs that have Maven coordinates. In this case, Console should depend on Client Java's fat JAR produced by assemble_maven
.
Some JARs in the distribution are not uniquely identified by Maven coordinates. It may cause one JAR to be overwritten by another, if they happen to have the same name.
Consider the following example: Suppose Console depends on
@vaticle_typedb_client_java//common
and@vaticle_typedb_common//common
. Whenbazel build
is invokedbazel-bin/external/vaticle_typedb_client_java/common/libcommon.jar
andbazel-bin/external/vaticle_typedb_common/common/libcommon.jar
will be generated, respectively. During the assembly process, both JARs will be placed within thelib
directory and given that both JARs have identical names, one will overwrite the other.Therefore, we must ensure that all JARs are uniquely identified by assigning Maven coordinates to each of them.