This repository has been archived by the owner on Aug 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathgvnix-dev-debug
executable file
·134 lines (111 loc) · 4.61 KB
/
gvnix-dev-debug
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/bash
# gvNIX, an Spring Roo Addon Suite, is sponsored by the General Directorate for Information
# Technologies (DGTI) of the Regional Ministry of Finance and Public
# Administration of the Generalitat Valenciana (Valencian Community,
# Spain), managed by gvSIG Association and led by DISID.
#
# Copyright (C) 2010 DGTI - Generalitat Valenciana
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses />.
# Uncomment the following commented lines to execute this script on Mac OSx
#
#PRG="$0"
#
#cd `dirname "$PRG"`
#TARGET_FILE=`basename $PRG`
#while [ -L "$TARGET_FILE" ]
#do
# TARGET_FILE=`readlink $TARGET_FILE`
# cd `dirname $TARGET_FILE`
# TARGET_FILE=`basename $TARGET_FILE`
#done
#
#PHYS_DIR=`pwd -P`
#this_file=$PHYS_DIR/$TARGET_FILE
this_file=`readlink -f $0`
this_dir=`dirname $this_file`
echo ""
echo "Executing gvNIX-dev!"
# Defining vars
export GVNIX_HOME="$this_dir"
export GVNIX_TARGET="$GVNIX_HOME/target"
export GVNIX_CACHE="$GVNIX_TARGET/roo/cache"
export GVNIX_BUNDLES="$GVNIX_TARGET/roo/bundle"
# Checking if ROO_HOME was specified
if [ "${ROO_HOME}x" == "x" ]; then
echo "### ERROR: You must define ROO_HOME variable to execute gvnix-dev"
exit
fi
# Checking if mvn clean install was executed before execute gvnix-dev
if [ ! -d "$GVNIX_TARGET" ]; then
echo "### ERROR: You must execute 'mvn clean install' in $GVNIX_HOME before execute gvnix-dev"
exit
fi
# Showing variables
echo ""
echo "ROO Home..................: $ROO_HOME"
echo "gvNIX Home................: $GVNIX_HOME"
echo "gvNIX target dir..........: $GVNIX_TARGET"
echo "ROO cache dir.............: $GVNIX_CACHE"
echo "ROO bundle dir............: $GVNIX_BUNDLES"
echo ""
# gvNIX: Remove OSGi cache and bundles if roo directory exists
if [ -d "$GVNIX_TARGET/roo" ]; then
rm -r "$GVNIX_TARGET/roo"
fi
# gvNIX: Creating Bundle and Cache folders
mkdir -p "$GVNIX_CACHE"
mkdir -p "$GVNIX_BUNDLES"
# gvNIX: copy add-ons to gvNIX ROO bundles
cp `find $GVNIX_TARGET/osgi-repository-bin/org/gvnix/ -iname org.gvnix.*.jar` "$GVNIX_BUNDLES"
# ROO: copy ROO add-ons to gvNIX ROO Bundles
cp -r "$ROO_HOME/bundle/." "$GVNIX_BUNDLES"
# Store file locations in variables to facilitate Cygwin conversion if needed
# Build a classpath containing our two magical startup JARs (we look for " /" as per ROO-905)
ROO_CP=`echo "$ROO_HOME"/bin/*.jar | sed 's/ \//:\//g'`
# echo ROO_CP: $ROO_CP
ROO_OSGI_FRAMEWORK_STORAGE="$GVNIX_CACHE"
# echo "ROO_OSGI_FRAMEWORK_STORAGE: $ROO_OSGI_FRAMEWORK_STORAGE"
ROO_AUTO_DEPLOY_DIRECTORY="$GVNIX_BUNDLES"
# echo "ROO_AUTO_DEPLOY_DIRECTORY: $ROO_AUTO_DEPLOY_DIRECTORY"
ROO_CONFIG_FILE_PROPERTIES="$ROO_HOME/conf/config.properties"
# echo "ROO_CONFIG_FILE_PROPERTIES: $ROO_CONFIG_FILE_PROPERTIES"
cygwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
esac
if [ "$cygwin" = "true" ]; then
export ROO_HOME=`cygpath -wp "$ROO_HOME"`
export ROO_CP=`cygpath -wp "$ROO_CP"`
export ROO_OSGI_FRAMEWORK_STORAGE=`cygpath -wp "$ROO_OSGI_FRAMEWORK_STORAGE"`
export ROO_AUTO_DEPLOY_DIRECTORY=`cygpath -wp "$ROO_AUTO_DEPLOY_DIRECTORY"`
export ROO_CONFIG_FILE_PROPERTIES=`cygpath -wp "$ROO_CONFIG_FILE_PROPERTIES"`
fi
# make sure to disable the flash message feature for the default OSX terminal, we recommend to use a ANSI compliant terminal such as iTerm if flash message support is desired
APPLE_TERMINAL=false;
if [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then
APPLE_TERMINAL=true
fi
# Hop, hop, hop...
DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"
PAUSE=
#PAUSE="-Droo.pause=true"
METADATA_TRACE=
#METADATA_TRACE="-Droo.metadata.trace=true"
ANSI="-Droo.console.ansi=true"
java $PAUSE $DEBUG $METADATA_TRACE $ANSI -Dis.apple.terminal=$APPLE_TERMINAL $ROO_OPTS -Dorg.osgi.framework.bootdelegation=org.netbeans.lib.profiler,org.netbeans.lib.profiler.\* -Droo.args="$*" -DdevelopmentMode=true -Dorg.osgi.framework.storage="$ROO_OSGI_FRAMEWORK_STORAGE" -Dfelix.auto.deploy.dir="$ROO_AUTO_DEPLOY_DIRECTORY" -Dfelix.config.properties="file:$ROO_CONFIG_FILE_PROPERTIES" -cp "$ROO_CP" org.springframework.roo.bootstrap.Main
EXITED=$?
echo Roo exited with code $EXITED