Created
February 9, 2013 19:31
-
-
Save dcolish/4746700 to your computer and use it in GitHub Desktop.
Always have the javadocs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $DEBUG ]; then | |
set -x | |
fi | |
set -e | |
unpackJar() { | |
echo $1 | |
FILE=$(python -c "import sys,os.path; print (os.path.abspath(sys.argv[1]))" $1) | |
NO_EXT=$(python -c "import sys,os.path; print (os.path.splitext(sys.argv[1])[0])" $1) | |
DOC_DIR=target/javadoc/$(basename $NO_EXT) | |
mkdir -p $DOC_DIR | |
pushd $DOC_DIR | |
jar xvf $FILE | |
popd | |
} | |
export -f unpackJar | |
mvn dependency:copy-dependencies -Dclassifier=javadoc | |
find target/dependency -type f -name "*.jar" | xargs -I% bash -ic "unpackJar %" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment