From: Mathieu Baudier Date: Thu, 30 Jul 2009 15:23:35 +0000 (+0000) Subject: Improve launcher X-Git-Tag: argeo-slc-2.1.7~1576 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=ba94ee573e92ca76fdab8761bb2be0e68be6de06;p=gpl%2Fargeo-slc.git Improve launcher Introduce groovy / upgrade ASM git-svn-id: https://svn.argeo.org/slc/trunk@2838 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/pom.xml b/pom.xml index 1a0cbd43a..1bf4bf5f2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.argeo.slc argeo-slc @@ -26,6 +27,7 @@ 6.0.18 3.4.2.R34x_v20080826-1230 1.5.6 + 2.2.3 2.0.0 5.2.0.0006 0.1.15 @@ -684,14 +686,18 @@ limitations under the License. org.objectweb.asm com.springsource.org.objectweb.asm - 1.5.3 + ${version.asm} org.objectweb.asm com.springsource.org.objectweb.asm.attrs - 1.5.3 + ${version.asm} + + + org.objectweb.asm + com.springsource.org.objectweb.asm.tree.analysis + ${version.asm} - org.apache.ant @@ -1102,11 +1108,17 @@ limitations under the License. 1.2.0 + org.beanshell com.springsource.bsh 2.0.0.b4 + + org.codehaus.groovy + com.springsource.org.codehaus.groovy + 1.6.3 + org.apache.commons diff --git a/runtime/org.argeo.slc.launcher/pom.xml b/runtime/org.argeo.slc.launcher/pom.xml index 3a6d19f8a..524f7d457 100644 --- a/runtime/org.argeo.slc.launcher/pom.xml +++ b/runtime/org.argeo.slc.launcher/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.argeo.slc @@ -60,6 +61,26 @@ + + maven-resources-plugin + + + validate + + copy-resources + + + ${basedir}/target/base + + + src/main/base + true + + + + + + @@ -67,6 +88,10 @@ org.argeo.slc.runtime org.argeo.slc.core + + org.argeo.slc.runtime + org.argeo.slc.osgiboot + org.argeo.dep.osgi diff --git a/runtime/org.argeo.slc.launcher/src/assembly/base.xml b/runtime/org.argeo.slc.launcher/src/assembly/base.xml index aef97a5cd..565dbd4b9 100644 --- a/runtime/org.argeo.slc.launcher/src/assembly/base.xml +++ b/runtime/org.argeo.slc.launcher/src/assembly/base.xml @@ -1,5 +1,4 @@ - base false @@ -8,9 +7,26 @@ - src/base + target/base 0755 + + *.sh + + + + target/base + + + *.bat + + + + target/base + + + work/** + \ No newline at end of file diff --git a/runtime/org.argeo.slc.launcher/src/base/bin/slc b/runtime/org.argeo.slc.launcher/src/base/bin/slc deleted file mode 100755 index ca8ef49d9..000000000 --- a/runtime/org.argeo.slc.launcher/src/base/bin/slc +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Find home -if [ -z "$ARGEO_SLC_HOME" -o ! -d "$ARGEO_SLC_HOME" ] ; then - ## resolve links - $0 may be a link to home - PRG="$0" - progname=`basename "$0"` - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi - done - - ARGEO_SLC_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - ARGEO_SLC_HOME=`cd "$ARGEO_SLC_HOME" && pwd` -fi - -echo ARGEO_SLC_HOME=$ARGEO_SLC_HOME - -for i in "${ARGEO_SLC_HOME}"/lib/*.jar - do - CLASSPATH="$CLASSPATH:$i" - done - -#echo CLASSPATH=$CLASSPATH - -java -cp $CLASSPATH org.argeo.slc.cli.SlcMain "$@" diff --git a/runtime/org.argeo.slc.launcher/src/main/base/bin/slc b/runtime/org.argeo.slc.launcher/src/main/base/bin/slc new file mode 100755 index 000000000..ca8ef49d9 --- /dev/null +++ b/runtime/org.argeo.slc.launcher/src/main/base/bin/slc @@ -0,0 +1,35 @@ +#!/bin/sh + +# Find home +if [ -z "$ARGEO_SLC_HOME" -o ! -d "$ARGEO_SLC_HOME" ] ; then + ## resolve links - $0 may be a link to home + PRG="$0" + progname=`basename "$0"` + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi + done + + ARGEO_SLC_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + ARGEO_SLC_HOME=`cd "$ARGEO_SLC_HOME" && pwd` +fi + +echo ARGEO_SLC_HOME=$ARGEO_SLC_HOME + +for i in "${ARGEO_SLC_HOME}"/lib/*.jar + do + CLASSPATH="$CLASSPATH:$i" + done + +#echo CLASSPATH=$CLASSPATH + +java -cp $CLASSPATH org.argeo.slc.cli.SlcMain "$@" diff --git a/runtime/org.argeo.slc.launcher/src/main/base/launch.bat b/runtime/org.argeo.slc.launcher/src/main/base/launch.bat new file mode 100644 index 000000000..a05166a8a --- /dev/null +++ b/runtime/org.argeo.slc.launcher/src/main/base/launch.bat @@ -0,0 +1,4 @@ +@echo off +set SLC_HOME=%~dp0.. + +java %JAVA_OPTS% -jar lib\org.eclipse.osgi-${version.equinox}.jar -clean -console -configuration work\%1\conf -data work\%1\data \ No newline at end of file diff --git a/runtime/org.argeo.slc.launcher/src/main/base/launch.sh b/runtime/org.argeo.slc.launcher/src/main/base/launch.sh new file mode 100644 index 000000000..fa3697435 --- /dev/null +++ b/runtime/org.argeo.slc.launcher/src/main/base/launch.sh @@ -0,0 +1,23 @@ +#!/bin/sh +INSTANCE=$1 + +# Defaults +if [ -z "$INSTANCE" ]; then + INSTANCE=agent +fi + +echo "Using configuration: $INSTANCE" + +WORK_DIR=work/$INSTANCE +if [ -z "$JAVA_OPTS" ]; then + JAVA_OPTS=-Xmx256m +fi + +if [ -d "$WORK_DIR" ]; then +java $JAVA_OPTS -jar lib/org.eclipse.osgi-${version.equinox}.jar \ + -clean -console \ + -configuration $WORK_DIR/conf \ + -data $WORK_DIR/data +else + echo "$WORK_DIR does not exist. Please specify a proper configuration name." +fi diff --git a/runtime/org.argeo.slc.launcher/src/main/base/work/default/conf/config.ini b/runtime/org.argeo.slc.launcher/src/main/base/work/default/conf/config.ini new file mode 100644 index 000000000..14b541c1e --- /dev/null +++ b/runtime/org.argeo.slc.launcher/src/main/base/work/default/conf/config.ini @@ -0,0 +1,7 @@ +osgi.bundles=org.argeo.slc.osgiboot-${project.version}.jar@start +slc.osgi.bundles=${osgi.install.area};in=*.jar +slc.osgi.start=org.springframework.osgi.extender,\ + org.argeo.slc.agent,\ + org.argeo.slc.agent.jms,\ + org.argeo.slc.support.equinox + diff --git a/runtime/org.argeo.slc.support.simple/pom.xml b/runtime/org.argeo.slc.support.simple/pom.xml index 0e6e8fdff..ea8c975be 100644 --- a/runtime/org.argeo.slc.support.simple/pom.xml +++ b/runtime/org.argeo.slc.support.simple/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.argeo.slc @@ -73,6 +74,15 @@ com.springsource.org.quartz + + org.springframework + org.springframework.context.support + + + org.springframework + org.springframework.transaction + + org.junit diff --git a/runtime/org.argeo.slc.unit/pom.xml b/runtime/org.argeo.slc.unit/pom.xml index 2094a46e2..9d8bed7fd 100644 --- a/runtime/org.argeo.slc.unit/pom.xml +++ b/runtime/org.argeo.slc.unit/pom.xml @@ -1,4 +1,5 @@ - + 4.0.0 org.argeo.slc @@ -98,11 +99,18 @@ org.springframework.osgi org.springframework.osgi.core - + org.argeo.slc.runtime org.argeo.slc.launcher + + + + org.springframework.ws + org.springframework.oxm + true +