#!/bin/bash

# not yet integrated into any formal build step.
# usage: after you've run ./build, run ./package_java to generate a jar
set -e

echo "packaging java"
# retrieve protocol buffer dependency
java -jar $IVY -sync -retrieve "target/lib/[conf]/[artifact]-[type].[ext]"
# compile java file generated by protocol buffrs
javac -cp target/lib/default/protobuf-java-jar.jar target/java/jampb/ClientContainer.java
pushd target/java/jampb
# create jar with all classes generated by javac 
jar cvf jampb-clientcontainer.jar `find . -name \*.class` 
popd

