forked from eXist-db/exist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·49 lines (36 loc) · 1.42 KB
/
build.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
#!/bin/bash
# $Id$
JAVA_RUN="$JAVA_HOME/bin/java"
if [ "$JAVA_HOME" = "" ] ; then
JAVA_RUN="java"
echo "WARNING: JAVA_HOME not found in your environment."
# This should be an error according to the java guidelines, stop changing it. /ljo
# echo
# echo "Please, set the JAVA_HOME variable in your environment to match the"
# echo "location of the Java Virtual Machine you want to use."
# exit 1
fi
#if [ ! -d "$JAVA_HOME" ]; then
# JAVA_HOME="%{JAVA_HOME}"
#fi
if [ -z "$EXIST_HOME" ]; then
P=$(dirname $0)
if test "$P" = "."
then
EXIST_HOME="`pwd`"
else
EXIST_HOME="$P"
fi
fi
ANT_HOME="$EXIST_HOME/tools/ant"
LOCALCLASSPATH="$ANT_HOME/lib/ant-launcher-1.9.7.jar"
JAVA_ENDORSED_DIRS="$EXIST_HOME"/lib/endorsed
# You must set
# -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
# Otherwise Ant will fail to do junitreport with Saxon, as it has a direct dependency on Xalan.
# This is also true for installer target which uses {http://exslt.org/strings}tokenize(). /ljo
JAVA_OPTS="-Dant.home=$ANT_HOME -Dant.library.dir=$ANT_HOME/lib -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dexist.home=$EXIST_HOME -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl $JAVA_OPTS"
echo Starting Ant...
echo
echo "$JAVA_RUN"
"$JAVA_RUN" -Xms512m -Xmx512m "$JAVA_OPTS" -classpath "$LOCALCLASSPATH" org.apache.tools.ant.launch.Launcher $*