Commit d07ed656 authored by Christophe Demarey's avatar Christophe Demarey

Allow to use the remote profile with explorer.

parent a3bc9382
......@@ -62,12 +62,15 @@ parse_opts() {
FRASCATI_SUB_CMD=$1
shift
FRASCATI_SCRIPT_FLAG=
while getopts 's' OPTION
FRASCATI_REMOTE_FLAG=
while getopts 'sr' OPTION
do
case $OPTION in
s) FRASCATI_SCRIPT_FLAG=1
;;
?) printf "Usage: %s %s [-s] args\n" $(basename $0) $FRASCATI_SUB_CMD >&2
r) FRASCATI_REMOTE_FLAG=1
;;
?) printf "Usage: %s %s [-s] [-r] args\n" $(basename $0) $FRASCATI_SUB_CMD >&2
exit 2
;;
esac
......@@ -125,6 +128,7 @@ echo "$2"
explorer() {
EXPLORER_LAUNCHER=org.ow2.frascati.explorer.FrascatiExplorerLauncher
EXPLORER_CLASSPATH=$FRASCATI_LIB,$FRASCATI_LIB/explorer
EXPLORER_BOOTSTRAP=
COMPOSITES=
if [ -d $SCA_APPS_FOLDER ]
......@@ -146,12 +150,24 @@ explorer() {
done
fi
if [ "$FRASCATI_SCRIPT_FLAG" ]
if [ "$FRASCATI_REMOTE_FLAG" ]
then
EXPLORER_CLASSPATH=$EXPLORER_CLASSPATH,$FRASCATI_LIB/fscript,$FRASCATI_LIB/explorer-fscript-plugin
printf -- "-\> FraSCAti Script plugin activated\n"
EXPLORER_CLASSPATH=$EXPLORER_CLASSPATH,$FRASCATI_LIB/remote,$FRASCATI_LIB/fscript
EXPLORER_BOOTSTRAP=-Dorg.ow2.frascati.bootstrap=org.ow2.frascati.bootstrap.FraSCAtiJDTFractalRest
printf -- "-\> FraSCAti Remote plugin activated\n"
if [ "$FRASCATI_SCRIPT_FLAG" ]
then
EXPLORER_CLASSPATH=$EXPLORER_CLASSPATH,$FRASCATI_LIB/explorer-fscript-plugin
printf -- "-\> FraSCAti Script plugin activated\n"
fi
else
if [ "$FRASCATI_SCRIPT_FLAG" ]
then
EXPLORER_CLASSPATH=$EXPLORER_CLASSPATH,$FRASCATI_LIB/fscript,$FRASCATI_LIB/explorer-fscript-plugin
printf -- "-\> FraSCAti Script plugin activated\n"
fi
fi
$JAVA -cp $LAUNCHER_LIB $LAUNCHER_MAIN $EXPLORER_LAUNCHER -lib $EXPLORER_CLASSPATH $COMPOSITES
$JAVA $EXPLORER_BOOTSTRAP -cp $LAUNCHER_LIB $LAUNCHER_MAIN $EXPLORER_LAUNCHER -lib $EXPLORER_CLASSPATH $COMPOSITES
}
case "$1" in
......
......@@ -57,6 +57,9 @@ if "%1" == "--version" goto VERSION
if "%1" == "-v" goto VERSION
if "%2" == "-s" set FRASCATI_SCRIPT_FLAG=TRUE
if "%3" == "-s" set FRASCATI_SCRIPT_FLAG=TRUE
if "%2" == "-r" set FRASCATI_REMOTE_FLAG=TRUE
if "%3" == "-r" set FRASCATI_REMOTE_FLAG=TRUE
if "%1" == "wsdl2java" (
echo Compiling ...
......@@ -143,13 +146,24 @@ goto END
:EXPLORER
shift
set EXPLORER_LAUNCHER=org.ow2.frascati.explorer.FrascatiExplorerLauncher
set EXPLORER_CLASSPATH=%FRASCATI_LIB%,%FRASCATI_LIB%\explorer
set EXPLORER_CLASSPATH=%FRASCATI_LIB%,%FRASCATI_LIB%\explorer
set EXPLORER_BOOTSTRAP=
echo Running the OW2 FraSCAti Explorer ...
if "%FRASCATI_SCRIPT_FLAG%" == "TRUE" (
set EXPLORER_CLASSPATH=%EXPLORER_CLASSPATH%,%FRASCATI_LIB%\fscript,%FRASCATI_LIB%\explorer-fscript-plugin
echo -^> FraSCAti Script plugin activated
if "%FRASCATI_REMOTE_FLAG%" == "TRUE" (
set EXPLORER_CLASSPATH=%EXPLORER_CLASSPATH%,%FRASCATI_LIB%\fscript,%FRASCATI_LIB%\remote
set EXPLORER_BOOTSTRAP="-Dorg.ow2.frascati.bootstrap=org.ow2.frascati.bootstrap.FraSCAtiJDTFractalRest"
echo -^> FraSCAti Remote plugin activated
if "%FRASCATI_SCRIPT_FLAG%" == "TRUE" (
set EXPLORER_CLASSPATH=%EXPLORER_CLASSPATH%,%FRASCATI_LIB%\explorer-fscript-plugin
echo -^> FraSCAti Script plugin activated
)
) else (
if "%FRASCATI_SCRIPT_FLAG%" == "TRUE" (
set EXPLORER_CLASSPATH=%EXPLORER_CLASSPATH%,%FRASCATI_LIB%\fscript,%FRASCATI_LIB%\explorer-fscript-plugin
echo -^> FraSCAti Script plugin activated
)
)
if exist %SCA_APPS_FOLDER% (
......@@ -165,7 +179,7 @@ if exist %SCA_APPS_FOLDER% (
setlocal DISABLEDELAYEDEXPANSION
)
"%JAVA%" %JAVA_OPTS% -cp "%LAUNCHER_LIB%" %LAUNCHER_MAIN% %EXPLORER_LAUNCHER% -lib "%EXPLORER_CLASSPATH%" %COMPOSITES%
"%JAVA%" %JAVA_OPTS% %EXPLORER_BOOTSTRAP% -cp "%LAUNCHER_LIB%" %LAUNCHER_MAIN% %EXPLORER_LAUNCHER% -lib "%EXPLORER_CLASSPATH%" %COMPOSITES%
echo Exiting OW2 FraSCAti Explorer ...
goto END
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment