forked from highsource/annox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-JXX.sh
executable file
·53 lines (50 loc) · 2.08 KB
/
build-JXX.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#
# Usage: build-JXX.sh [option(s)] [goal(s)]
# Example: build-JXX.sh clean install
#
# Profile Id: none - default, install common jars to local repository.
# Profile Id: assembly - assemble (zip) explorer, samples projects.
# Profile Id: all - package the above plus templates and tutorials.
#
# How to build and test:
#
# 1) build-JXX.sh -DskipTests=true clean install
# 2) build-JXX.sh -DskipTests=true -Pall clean package
# 3) build-JXX.sh -DskipTests=false -Pall test
# Notes:
# Step #1 installs the shared libraries to your local maven repository.
# Step #2 packages the shared, test and sample projects.
# Step #3 unit test the shared, test and sample projects.
#
if [ ! -d "${JAVA_HOME}" ]; then
echo "Please configure Java home path."
echo "Debian:"
echo " apt-cache search openjdk"
echo " sudo apt-get install openjdk-XX-jdk"
echo " sudo apt-get install openjdk-XX-source"
echo " sudo update-java-alternatives --set java-1.XX.0-openjdk-amd64"
exit 1
fi
BASEDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source ${BASEDIR}/build-INC.sh
if [ $# -eq 0 ]; then
${BASEDIR}/build.sh
else
source ${BASEDIR}/build-CFG.sh
mvn ${JVM_SYS_PROPS} "$@"
fi
# Release to Maven Central via Sonatype Nexus Repository Manager
# 1) Set MVN_ARGS to "-T 1" and commit/push
# 2) Exit mc, use the same TTY to reuse gpg signing daemon.
# 3) To "prime" the GnuPG agent...............: echo "test" | gpg --clearsign
# 4) To delete a TAG..........................: git tag -d N.N.N; git push origin --delete N.N.N
# 5) To throw away the last N local commits...: git reset --hard HEAD~N
# 6) To ruthlessly force local repo to remote.: git push --force origin master
# 7) git status; git remote show origin
# Note: Child modules are SKIPPED (normally) for some goals.
# ./build-JXX.sh -DskipTests=true clean install
# ./build-JXX.sh -DskipTests=true -Pnexus-deploy clean deploy
# ./build-JXX.sh -DskipTests=true -DdryRun=false release:clean
# ./build-JXX.sh -DskipTests=true -DdryRun=false release:prepare
# ./build-JXX.sh -DskipTests=true -DdryRun=false release:perform