I have an app that runs on the JVM, provided as a fat jar. It needs to invoke a native Linux binary, for example ffmpeg
. What directory structure would a Zip file need to contain in order to package both the jar and the executable together? I cannot find documentation, just code examples using build tools that I have not worked with.
Let's pretend the name of my lambda is blah
. I am hoping to get an answer like:
Deployable jar contains:
+ blah/ # contains fat jar
+ lib/ # contains ffmpeg
Here is a bash script I wrote that does not work. It just puts the fat jar and the native executable in the dist/
directory before zipping them together.
FATJAR=blah-assembly-0.0.4.jar
mkdir -p dist/
rm -f dist/*
rm -f $DEPLOYED_ZIP
cp $FATJAR dist/
cp /usr/local/bin/ffmpeg dist/
(cd dist && zip -r $FATJAR ffmpeg && mv $FATJAR ../$DEPLOYED_ZIP)