
This is a new JAR produced by the build that contains almost all of the code that the corresponding WAR contains at runtime. This permits plugin authors to compile against this single interface JAR, and then load their plugin into a running server that uses the real WAR. Having the API be a single JAR simplifies plugin development, Maven users can depend on this single JAR using the provided scope. Other IDE users can just make a new Java project and add this single JAR as the only dependency. Change-Id: Ie045ec4202d44b78b75ccb4af000e13c1e7378ce
38 lines
957 B
Bash
Executable File
38 lines
957 B
Bash
Executable File
#!/bin/sh
|
|
|
|
SRC=$(ls gerrit-plugin-api/target/gerrit-plugin-api-*-sources.jar)
|
|
VER=${SRC#gerrit-plugin-api/target/gerrit-plugin-api-}
|
|
VER=${VER%-sources.jar}
|
|
JAR=gerrit-plugin-api/target/gerrit-plugin-api-$VER.jar
|
|
|
|
type=release
|
|
case $VER in
|
|
*-SNAPSHOT)
|
|
echo >&2 "fatal: Cannot deploy $VER"
|
|
echo >&2 " Use ./tools/version.sh --release && mvn clean package"
|
|
exit 1
|
|
;;
|
|
*-[0-9]*-g*) type=snapshot ;;
|
|
esac
|
|
URL=s3://gerrit-api@commondatastorage.googleapis.com/$type
|
|
|
|
echo "Deploying gerrit-plugin-api $VER to $URL"
|
|
mvn deploy:deploy-file \
|
|
-DgroupId=com.google.gerrit \
|
|
-DartifactId=gerrit-plugin-api \
|
|
-Dversion=$VER \
|
|
-Dpackaging=jar \
|
|
-Dfile=$JAR \
|
|
-DrepositoryId=gerrit-api-repository \
|
|
-Durl=$URL
|
|
|
|
mvn deploy:deploy-file \
|
|
-DgroupId=com.google.gerrit \
|
|
-DartifactId=gerrit-plugin-api \
|
|
-Dversion=$VER \
|
|
-Dpackaging=java-source \
|
|
-Dfile=$SRC \
|
|
-Djava-source=false \
|
|
-DrepositoryId=gerrit-api-repository \
|
|
-Durl=$URL
|