Yuta HIGUCHI | 6ee6b8c | 2017-05-09 14:44:30 -0700 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | |
| 3 | # Script to replace OF southbound with maven built artifact, |
| 4 | # which can use native-transport inside karaf |
| 5 | |
| 6 | # Workadound until buck built artifact can build equivalent. |
| 7 | |
| 8 | cd $ONOS_ROOT || exit 1 |
| 9 | . tools/build/envDefaults |
| 10 | |
| 11 | echo "Preparing onos tarball" |
| 12 | onos-package |
| 13 | |
| 14 | echo "Building onos-protocols-openflow-ctl with native-transport" |
| 15 | mvn install -DskipTests -Dcheckstyle.skip -am --projects :onos-protocols-openflow-ctl -T 1C |
| 16 | |
| 17 | . tools/build/envDefaults |
| 18 | |
| 19 | echo "Repackaging onos tarball" |
| 20 | cd $ONOS_STAGE_ROOT || exit 1 |
| 21 | tar xf $ONOS_TAR |
| 22 | |
| 23 | cp -p $ONOS_ROOT/protocols/openflow/ctl/target/onos-protocols-openflow-ctl-$ONOS_POM_VERSION.jar /tmp/onos-$ONOS_POM_VERSION/apache-karaf-$KARAF_VERSION/system/org/onosproject/onos-protocols-openflow-ctl/$ONOS_POM_VERSION/onos-protocols-openflow-ctl-$ONOS_POM_VERSION.jar |
| 24 | |
| 25 | rm $ONOS_TAR |
| 26 | |
| 27 | tar czf $ONOS_TAR onos-$ONOS_POM_VERSION/ |
| 28 | |
| 29 | echo "Repackaged:" |
| 30 | ls -l $ONOS_TAR |
| 31 | |