Remove duplicate JsonFactory service declaration
When merging all the jars using the Buck java_binary
rule, all the META-INF entries get collapsed together in
the resulting fat-jar.
JsonFactory service definition isn't useful for our purpose
and is even included multiple times: this confuses the processing
of the Jar file when we need to update its manifest.
Getting rid of the unwanted files resolves the problem at source.
Change-Id: Ie419f52b6c000bf6e76f32a1bd0153bf1c8739cd
diff --git a/jenkins/gerrit-buck-build-owners-plugin.sh b/jenkins/gerrit-buck-build-owners-plugin.sh
index 5e36bca..c9ff06f 100755
--- a/jenkins/gerrit-buck-build-owners-plugin.sh
+++ b/jenkins/gerrit-buck-build-owners-plugin.sh
@@ -22,6 +22,7 @@
do
PLUGIN_VERSION=$(git describe --always origin/{branch})
echo -e "Implementation-Version: $PLUGIN_VERSION" > MANIFEST.MF
+ zip -d $JAR META-INF/services/com.fasterxml.jackson.core.JsonFactory
jar ufm $JAR MANIFEST.MF && rm MANIFEST.MF
DEST_JAR=buck-out/gen/plugins/{name}/$(basename $JAR)
[ "$JAR" -ef "$DEST_JAR" ] || mv $JAR $DEST_JAR