decouple buck yang plugin from buck main archive
- prep to allow bumping yang tool versin without releasing whole
onos-buck archive
- with this patch,
reverting back from locally patched state
(= undo `patch-yang-libs`)
will be:
$ git checkout -- lib/BUCK tools/build/onos-buck
Change-Id: I06bfccdcfd6b22e2252b5c9dc145cece26058841
diff --git a/tools/dev/bin/patch-yang-libs b/tools/dev/bin/patch-yang-libs
index 3e269fe..2686836 100755
--- a/tools/dev/bin/patch-yang-libs
+++ b/tools/dev/bin/patch-yang-libs
@@ -45,6 +45,12 @@
if [ ! -f "$YANG_PLUGIN_SRC" ]; then
mvn -f $YANG_TOOLS_ROOT/pom.xml -am -pl :onos-yang-compiler-buck-plugin install -DskipTests -Dcheckstyle.skip
fi
-# Patch the YANG BUCK plugin
-cp -p $YANG_PLUGIN_SRC \
- $ONOS_ROOT/bin/plugins/yang.jar
+# populate buck plugin cache with SNAPSHOT version
+ARTIFACT="org.onosproject:onos-yang-compiler-buck-plugin:$SVER"
+mvn org.apache.maven.plugins:maven-dependency-plugin:3.0.2:copy \
+ -Dartifact=$ARTIFACT \
+ -Dtransitive=false -Dmdep.overWriteSnapshots=true \
+ -DoutputDirectory=$ONOS_ROOT/bin/cache > /dev/null
+
+# Patch the YANG BUCK plugin version specified
+sed -i.bak "s/YANG_VER=\"$BVER\"/YANG_VER=\"$SVER\"/" $ONOS_ROOT/tools/build/onos-buck