From ba94ee573e92ca76fdab8761bb2be0e68be6de06 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Thu, 30 Jul 2009 15:23:35 +0000 Subject: [PATCH] Improve launcher Introduce groovy / upgrade ASM git-svn-id: https://svn.argeo.org/slc/trunk@2838 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- pom.xml | 20 +++++++++++--- runtime/org.argeo.slc.launcher/pom.xml | 27 ++++++++++++++++++- .../src/assembly/base.xml | 22 ++++++++++++--- .../src/{ => main}/base/bin/slc | 0 .../src/main/base/launch.bat | 4 +++ .../src/main/base/launch.sh | 23 ++++++++++++++++ .../main/base/work/default/conf/config.ini | 7 +++++ runtime/org.argeo.slc.support.simple/pom.xml | 12 ++++++++- runtime/org.argeo.slc.unit/pom.xml | 12 +++++++-- 9 files changed, 116 insertions(+), 11 deletions(-) rename runtime/org.argeo.slc.launcher/src/{ => main}/base/bin/slc (100%) create mode 100644 runtime/org.argeo.slc.launcher/src/main/base/launch.bat create mode 100644 runtime/org.argeo.slc.launcher/src/main/base/launch.sh create mode 100644 runtime/org.argeo.slc.launcher/src/main/base/work/default/conf/config.ini 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/main/base/bin/slc similarity index 100% rename from runtime/org.argeo.slc.launcher/src/base/bin/slc rename to runtime/org.argeo.slc.launcher/src/main/base/bin/slc 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 + -- 2.39.2