Improve launcher
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 30 Jul 2009 15:23:35 +0000 (15:23 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 30 Jul 2009 15:23:35 +0000 (15:23 +0000)
Introduce groovy / upgrade ASM

git-svn-id: https://svn.argeo.org/slc/trunk@2838 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

pom.xml
runtime/org.argeo.slc.launcher/pom.xml
runtime/org.argeo.slc.launcher/src/assembly/base.xml
runtime/org.argeo.slc.launcher/src/base/bin/slc [deleted file]
runtime/org.argeo.slc.launcher/src/main/base/bin/slc [new file with mode: 0755]
runtime/org.argeo.slc.launcher/src/main/base/launch.bat [new file with mode: 0644]
runtime/org.argeo.slc.launcher/src/main/base/launch.sh [new file with mode: 0644]
runtime/org.argeo.slc.launcher/src/main/base/work/default/conf/config.ini [new file with mode: 0644]
runtime/org.argeo.slc.support.simple/pom.xml
runtime/org.argeo.slc.unit/pom.xml

diff --git a/pom.xml b/pom.xml
index 1a0cbd43a56a27c8c80e1c3c1f75e3888edfbb61..1bf4bf5f2fca9eab5bf4a5c6e3749ef72af3c595 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.argeo.slc</groupId>
        <artifactId>argeo-slc</artifactId>
@@ -26,6 +27,7 @@
                <version.tomcat>6.0.18</version.tomcat>
                <version.equinox>3.4.2.R34x_v20080826-1230</version.equinox>
                <version.slf4j>1.5.6</version.slf4j>
+               <version.asm>2.2.3</version.asm>
                <version.maven-bundle-plugin>2.0.0</version.maven-bundle-plugin>
                <version.activemq>5.2.0.0006</version.activemq>
                <version.maven-argeo-osgi>0.1.15</version.maven-argeo-osgi>
@@ -684,14 +686,18 @@ limitations under the License.
                        <dependency>
                                <groupId>org.objectweb.asm</groupId>
                                <artifactId>com.springsource.org.objectweb.asm</artifactId>
-                               <version>1.5.3</version>
+                               <version>${version.asm}</version>
                        </dependency>
                        <dependency>
                                <groupId>org.objectweb.asm</groupId>
                                <artifactId>com.springsource.org.objectweb.asm.attrs</artifactId>
-                               <version>1.5.3</version>
+                               <version>${version.asm}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.objectweb.asm</groupId>
+                               <artifactId>com.springsource.org.objectweb.asm.tree.analysis</artifactId>
+                               <version>${version.asm}</version>
                        </dependency>
-
                        <!-- Ant -->
                        <dependency>
                                <groupId>org.apache.ant</groupId>
@@ -1102,11 +1108,17 @@ limitations under the License.
                                <version>1.2.0</version>
                        </dependency>
 
+                       <!-- Dynamic scripts -->
                        <dependency>
                                <groupId>org.beanshell</groupId>
                                <artifactId>com.springsource.bsh</artifactId>
                                <version>2.0.0.b4</version>
                        </dependency>
+                       <dependency>
+                               <groupId>org.codehaus.groovy</groupId>
+                               <artifactId>com.springsource.org.codehaus.groovy</artifactId>
+                               <version>1.6.3</version>
+                       </dependency>
 
                        <dependency>
                                <groupId>org.apache.commons</groupId>
index 3a6d19f8aaf1618d45bf4fb2f51e7c391d58c265..524f7d457de641513d84ff7de22f5c9d44320f08 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.slc</groupId>
                                        </instructions>
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <phase>validate</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${basedir}/target/base</outputDirectory>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>src/main/base</directory>
+                                                                       <filtering>true</filtering>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
        </build>
        <dependencies>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.core</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.osgiboot</artifactId>
+               </dependency>
 
                <dependency>
                        <groupId>org.argeo.dep.osgi</groupId>
index aef97a5cd963b64e84bd1ded5e9f88b882358946..565dbd4b99a2667f12546d8331a54c0e90f6fb0c 100644 (file)
@@ -1,5 +1,4 @@
-<assembly xmlns="http://maven.apache.org/POM/4.0.0"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
        <id>base</id>
        <includeBaseDirectory>false</includeBaseDirectory>
@@ -8,9 +7,26 @@
        </formats>
        <fileSets>
                <fileSet>
-                       <directory>src/base</directory>
+                       <directory>target/base</directory>
                        <outputDirectory></outputDirectory>
                        <fileMode>0755</fileMode>
+                       <includes>
+                               <include>*.sh</include>
+                       </includes>
+               </fileSet>
+               <fileSet>
+                       <directory>target/base</directory>
+                       <outputDirectory></outputDirectory>
+                       <includes>
+                               <include>*.bat</include>
+                       </includes>
+               </fileSet>
+               <fileSet>
+                       <directory>target/base</directory>
+                       <outputDirectory></outputDirectory>
+                       <includes>
+                               <include>work/**</include>
+                       </includes>
                </fileSet>
        </fileSets>
 </assembly>
\ 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 (executable)
index ca8ef49..0000000
+++ /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 (executable)
index 0000000..ca8ef49
--- /dev/null
@@ -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 (file)
index 0000000..a05166a
--- /dev/null
@@ -0,0 +1,4 @@
+@echo off\r
+set SLC_HOME=%~dp0..\r
+\r
+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 (file)
index 0000000..fa36974
--- /dev/null
@@ -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 (file)
index 0000000..14b541c
--- /dev/null
@@ -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
+
index 0e6e8fdffd543915e1c44656607596433790ef1e..ea8c975be332e60a6feb1ff641753b4cf8b2b34e 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.slc</groupId>
                        <artifactId>com.springsource.org.quartz</artifactId>
                </dependency>
 
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>org.springframework.context.support</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>org.springframework.transaction</artifactId>
+               </dependency>
+
                <!-- Unit Tests -->
                <dependency>
                        <groupId>org.junit</groupId>
index 2094a46e2f2bfe5ab18e4d20bf1d1a103848a7b7..9d8bed7fd4911689fc74be0a7cff2c72632c72c8 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.slc</groupId>
                        <groupId>org.springframework.osgi</groupId>
                        <artifactId>org.springframework.osgi.core</artifactId>
                </dependency>
-               
+
                <!-- Client -->
                <dependency>
                        <groupId>org.argeo.slc.runtime</groupId>
                        <artifactId>org.argeo.slc.launcher</artifactId>
                </dependency>
+
+               <!-- OXM -->
+               <dependency>
+                       <groupId>org.springframework.ws</groupId>
+                       <artifactId>org.springframework.oxm</artifactId>
+                       <optional>true</optional>
+               </dependency>
        </dependencies>
 </project>