Skip to main content
summaryrefslogtreecommitdiffstats
blob: 4df837cafb6ff34b60d05da76fff290b80d95380 (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash

# Utility to invoke eclipse antrunner, from Eclipse platform, which must already be
# installed.

# This script here in "testScripts" is not used during the build or testing, but is 
# handy to have nearby to test things like "createDeltaPack.xml". 

bash_script=${0##*/}

BUILDFILE=$1
if [ -e $BUILDFILE ]
then
  BUILDFILESTR=" -file $BUILDFILE"
  shift
else
  BUILDFILESTR=" -file build.xml"
fi

# use special $@ to keep all (remaining) arguments quoted (instead of one big string)
# they are passed through to the antrunner via -vmargs. 

extraArgs="$@"

echo
echo " BUILDFILESTR: $BUILDFILESTR"
if [ -n "${extraArgs}" ]
then
  echo "   extraArgs: ${extraArgs}"
  echo "      as it is right now, target name must be first \"extraArg\" if specifying one."
fi
echo

APP_NAME=org.eclipse.ant.core.antRunner

devworkspace="${PWD}/workspace-antRunner"


export JAVA_HOME=/shared/common/jdk1.8.0_x64-latest
JAVA_EXEC_DIR=${JAVA_HOME}/bin
JAVA_CMD=${JAVA_EXEC_DIR}/java
ECLIPSE_EXE=${PWD}/eclipse/eclipse

echo
echo "   buildId:           ${buildId}"
echo "   buildType:         ${buildType}"
echo "   script:            ${bash_script}"
echo "   devworkspace:      $devworkspace"
echo "   APP_NAME:          $APP_NAME"
echo "   BUILDFILESTR:      $BUILDFILESTR"
echo "   extraArgs:         ${extraArgs}"
echo "   JAVA_HOME:         ${JAVA_HOME}"
echo "   ECLIPSE_EXE:       ${ECLIPSE_EXE}"
echo

echo
$JAVA_CMD -version
echo

${ECLIPSE_EXE} -nosplash -consolelog -debug  -data ${devworkspace} -vm ${JAVA_EXEC_DIR}  -application ${APP_NAME} ${BUILDFILESTR} ${extraArgs}
RC=$?

exit $RC

Back to the top