Skip to content

Instantly share code, notes, and snippets.

@tkatochin
Created March 18, 2011 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkatochin/875716 to your computer and use it in GitHub Desktop.
Save tkatochin/875716 to your computer and use it in GitHub Desktop.
gdata-java-clientをダウンロードして全てのライブラリをデプロイするシェル。
#!/bin/sh
if [ $# -ne 3 ]; then
echo "usage...: $0 gdata-version repository-url repository-id"
echo "ex.) $0 1.43.0 http://mylocal-nexus/content/repositories/thirdparty deploy-thirdparty"
exit 1
fi
curl -O http://gdata-java-client.googlecode.com/files/gdata-src.java-$1.zip
unzip gdata-src.java-$1.zip
cd gdata/java/src
zip -r ../lib/sources.jar com
cd ../lib
for jarfile in gdata-*.jar
do
echo deploy $jarfile ...
mvn deploy:deploy-file -Dfile=sources.jar -DgroupId=com.google.gdata \
-DartifactId=`echo "$jarfile"|sed 's/\.jar//'` \
-Dversion=$1 -Dpackaging=java-source -DgeneratePom=false \
-Durl=$2 -DrepositoryId=$3
mvn deploy:deploy-file -Dfile=$jarfile -DgroupId=com.google.gdata \
-DartifactId=`echo "$jarfile"|sed 's/\.jar//'` \
-Dversion=$1 -Dpackaging=jar -DgeneratePom=true \
-Durl=$2 -DrepositoryId=$3
done
exit 0;
@tkatochin
Copy link
Author

nexusにpackagingがjava-sourceで入っちゃうので順序を逆にしてみた。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment