From: Mathieu Baudier Date: Sun, 23 Nov 2008 16:17:30 +0000 (+0000) Subject: Start preparing OSGi runtime X-Git-Tag: argeo-slc-2.1.7~2384 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=2995b63156cd89a45446422195c315e2ee96f170;hp=2f57b9abf7e5110603e8cf952259509c76c9a162;p=gpl%2Fargeo-slc.git Start preparing OSGi runtime git-svn-id: https://svn.argeo.org/slc/trunk@1870 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/examples/org.argeo.slc.example01/pom.xml b/examples/org.argeo.slc.example01/pom.xml index 94254bf04..0557c384d 100644 --- a/examples/org.argeo.slc.example01/pom.xml +++ b/examples/org.argeo.slc.example01/pom.xml @@ -60,9 +60,26 @@ org.argeo.slc.example.* - *,org.argeo.slc.core.test.spring,org.springframework.oxm.castor,org.argeo.slc.msg.test.tree,org.apache.tools.ant,org.apache.tools.ant.taskdefs,org.apache.tools.ant.types - org.argeo.slc.example.Activator - org.argeo.slc.core,org.argeo.slc.agent + *, + org.argeo.slc.core.test.spring, + org.argeo.slc.xml.test.tree, + org.argeo.slc.castor.spring, + org.argeo.slc.castor.msg, + org.argeo.slc.castor.process, + org.argeo.slc.castor.structure, + org.argeo.slc.castor.test, + org.springframework.oxm.castor, + org.argeo.slc.core.test.tree, + org.argeo.slc.msg.test.tree, + org.apache.tools.ant, + org.apache.tools.ant.taskdefs, + org.apache.tools.ant.types + + @@ -88,7 +105,24 @@ org.argeo.slc.runtime org.argeo.slc.launcher ${project.version} - test + provided + + + + org.eclipse.osgi + org.eclipse.osgi + + + + org.springframework.osgi + org.springframework.osgi.extender + + + + org.apache.xmlcommons + com.springsource.org.apache.xmlcommons + + \ No newline at end of file diff --git a/examples/org.argeo.slc.example01/src/main/resources/META-INF/MANIFEST.MF b/examples/org.argeo.slc.example01/src/main/resources/META-INF/MANIFEST.MF index 7afbb0974..06803c1ce 100644 --- a/examples/org.argeo.slc.example01/src/main/resources/META-INF/MANIFEST.MF +++ b/examples/org.argeo.slc.example01/src/main/resources/META-INF/MANIFEST.MF @@ -1,36 +1,40 @@ Manifest-Version: 1.0 -Bundle-Activator: org.argeo.slc.example.Activator -Created-By: 1.5.0_16 (Sun Microsystems Inc.) +Export-Package: org.argeo.slc.example.appli;version="0.11.2.SNAPSHOT", + org.argeo.slc.example.ws.client.spring;version="0.11.2.SNAPSHOT",org. + argeo.slc.example;uses:="org.apache.commons.logging,org.argeo.slc.tes + t,org.argeo.slc.core.test,org.argeo.slc.core.structure,org.argeo.slc. + build,org.argeo.slc.example.appli,org.argeo.slc.test.context,org.arge + o.slc.core.test.context,org.argeo.slc.deploy,org.argeo.slc.structure, + org.argeo.slc.core.structure.tree";version="0.11.2.SNAPSHOT" +Tool: Bnd-0.0.255 +Bundle-Name: Argeo SLC Example 01 +Created-By: 1.6.0 (Sun Microsystems Inc.) +Bundle-Vendor: Argeo +Bundle-Version: 0.11.2.SNAPSHOT +Bundle-ManifestVersion: 2 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: An Example SLC application Import-Package: org.apache.commons.logging;version="1.1",org.apache.to ols.ant;version="1.7",org.apache.tools.ant.taskdefs;version="1.7",org .apache.tools.ant.types;version="1.7",org.argeo.slc.build;version="0. - 11.2.SNAPSHOT",org.argeo.slc.core.structure;version="0.11.2.SNAPSHOT" - ,org.argeo.slc.core.structure.tree;version="0.11.2.SNAPSHOT",org.arge - o.slc.core.test;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.con - text;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.spring;version - ="0.11.2.SNAPSHOT",org.argeo.slc.deploy;version="0.11.2.SNAPSHOT",org - .argeo.slc.example;version="0.11.2.SNAPSHOT",org.argeo.slc.example.ap - pli;version="0.11.2.SNAPSHOT",org.argeo.slc.example.ws.client.spring; - version="0.11.2.SNAPSHOT",org.argeo.slc.msg.test.tree;version="0.11.2 - .SNAPSHOT",org.argeo.slc.structure;version="0.11.2.SNAPSHOT",org.arge - o.slc.test;version="0.11.2.SNAPSHOT",org.argeo.slc.test.context;versi - on="0.11.2.SNAPSHOT",org.springframework.oxm.castor;version="1.5.5.A" -Export-Package: org.argeo.slc.example.appli;version="0.11.2.SNAPSHOT", - org.argeo.slc.example;uses:="org.argeo.slc.test.context,org.argeo.slc - .test,org.argeo.slc.core.test,org.argeo.slc.core.test.context,org.arg - eo.slc.build,org.apache.commons.logging,org.argeo.slc.structure,org.a - rgeo.slc.example.appli,org.argeo.slc.core.structure.tree,org.argeo.sl - c.deploy,org.argeo.slc.core.structure";version="0.11.2.SNAPSHOT",org. - argeo.slc.example.ws.client.spring;version="0.11.2.SNAPSHOT" -Bundle-Version: 0.11.2.SNAPSHOT -Bundle-Name: Argeo SLC Example 01 -Bundle-Description: An Example SLC application + 11.2.SNAPSHOT",org.argeo.slc.castor.msg;version="0.11.2.SNAPSHOT",org + .argeo.slc.castor.process;version="0.11.2.SNAPSHOT",org.argeo.slc.cas + tor.spring;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.structure;v + ersion="0.11.2.SNAPSHOT",org.argeo.slc.castor.test;version="0.11.2.SN + APSHOT",org.argeo.slc.core.structure;version="0.11.2.SNAPSHOT",org.ar + geo.slc.core.structure.tree;version="0.11.2.SNAPSHOT",org.argeo.slc.c + ore.test;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.context;ve + rsion="0.11.2.SNAPSHOT",org.argeo.slc.core.test.spring;version="0.11. + 2.SNAPSHOT",org.argeo.slc.core.test.tree;version="0.11.2.SNAPSHOT",or + g.argeo.slc.deploy;version="0.11.2.SNAPSHOT",org.argeo.slc.example;ve + rsion="0.11.2.SNAPSHOT",org.argeo.slc.example.appli;version="0.11.2.S + NAPSHOT",org.argeo.slc.example.ws.client.spring;version="0.11.2.SNAPS + HOT",org.argeo.slc.msg.test.tree;version="0.11.2.SNAPSHOT",org.argeo. + slc.structure;version="0.11.2.SNAPSHOT",org.argeo.slc.test;version="0 + .11.2.SNAPSHOT",org.argeo.slc.test.context;version="0.11.2.SNAPSHOT", + org.argeo.slc.xml.test.tree;version="0.11.2.SNAPSHOT",org.springframe + work.oxm.castor;version="1.5.5.A" +Bundle-SymbolicName: org.argeo.slc.example01 Bundle-DocURL: http://www.argeo.org Originally-Created-By: 1.6.0 (Sun Microsystems Inc.) -Bundle-Vendor: Argeo -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.argeo.slc.example01 -Tool: Bnd-0.0.255 -Require-Bundle: org.argeo.slc.core,org.argeo.slc.agent diff --git a/examples/org.argeo.slc.example01/src/main/resources/META-INF/spring/slc.xml b/examples/org.argeo.slc.example01/src/main/resources/META-INF/spring/slc.xml new file mode 100644 index 000000000..db133e67c --- /dev/null +++ b/examples/org.argeo.slc.example01/src/main/resources/META-INF/spring/slc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/examples/org.argeo.slc.example01/src/main/slc/conf/runtime/default.xml b/examples/org.argeo.slc.example01/src/main/slc/conf/runtime/default.xml index 94c2aa908..eb7204a9d 100644 --- a/examples/org.argeo.slc.example01/src/main/slc/conf/runtime/default.xml +++ b/examples/org.argeo.slc.example01/src/main/slc/conf/runtime/default.xml @@ -6,7 +6,7 @@ + resource="classpath:/org/argeo/slc/castor/spring/applicationContext.xml" /> @@ -36,7 +36,7 @@ - + diff --git a/org.argeo.slc/pom.xml b/org.argeo.slc/pom.xml index 10a123f4e..e767a7440 100644 --- a/org.argeo.slc/pom.xml +++ b/org.argeo.slc/pom.xml @@ -404,6 +404,7 @@ 1.8.0.9 + org.codehaus.castor com.springsource.org.castor diff --git a/runtime/org.argeo.slc.launcher/pom.xml b/runtime/org.argeo.slc.launcher/pom.xml index 4abb9d740..e52b08057 100644 --- a/runtime/org.argeo.slc.launcher/pom.xml +++ b/runtime/org.argeo.slc.launcher/pom.xml @@ -55,7 +55,6 @@ org.argeo.slc.* - *,org.argeo.slc.test.spring,org.apache.commons.cli;resolution:=optional @@ -79,5 +78,10 @@ org.argeo.dep.osgi.commons.cli + + org.eclipse.osgi + org.eclipse.osgi + + \ No newline at end of file diff --git a/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/OsgiLauncher.java b/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/OsgiLauncher.java new file mode 100644 index 000000000..d30ea68ac --- /dev/null +++ b/runtime/org.argeo.slc.launcher/src/main/java/org/argeo/slc/cli/OsgiLauncher.java @@ -0,0 +1,274 @@ +package org.argeo.slc.cli; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.lang.reflect.Method; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.StringTokenizer; +import java.util.Vector; + +import org.eclipse.core.runtime.adaptor.EclipseStarter; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; + +public class OsgiLauncher { + public final static String PROP_SLC_HOME = "slc.home"; + public final static String PROP_SLC_OSGI_START = "slc.osgi.start"; + public final static String PROP_SLC_OSGI_SCAN_CLASSPATH = "slc.osgi.scanClasspath"; + public final static String PROP_SLC_OSGI_EQUINOX_ARGS = "slc.osgi.equinox.args"; + + private final static String DEV_BUNDLE_PREFIX = "slc.osgi.devbundle."; + + public static void main(String[] args) { + info("Argeo SLC Detached launcher starting..."); + try { + // Load properties + String propertyPath = "slc-detached.properties"; + Properties config = prepareConfig(propertyPath); + + // Start app (in main class loader) + startApp(config); + + // Start OSGi framework + try { + startEquinox(config); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + info("Argeo SLC Detached launcher started."); + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + } + + protected static Properties prepareConfig(String propertyFilePath) + throws Exception { + // Format slc.home + String slcHome = System.getProperty(PROP_SLC_HOME); + if (slcHome != null) { + slcHome = new File(slcHome).getCanonicalPath(); + System.setProperty(PROP_SLC_HOME, slcHome); + } + + // Load config + Properties config = new Properties(); + InputStream in = null; + try { + File file = new File(propertyFilePath); + if (file.exists()) { + in = new FileInputStream(propertyFilePath); + config.load(in); + } + } finally { + if (in != null) + in.close(); + } + + // System properties have priority. + config.putAll(System.getProperties()); + return config; + } + + public static void startEquinox(Properties config) throws Exception { + info("java.class.path=" + System.getProperty("java.class.path")); + + File baseDir = new File(System.getProperty("user.dir")) + .getCanonicalFile(); + String equinoxConfigurationPath = baseDir.getPath() + File.separator + + "slc-detached" + File.separator + "equinoxConfiguration"; + + String equinoxArgsLineDefault = "-console -noExit -clean -debug -configuration " + + equinoxConfigurationPath; + String equinoxArgsLine = System.getProperty(PROP_SLC_OSGI_EQUINOX_ARGS, + equinoxArgsLineDefault); + // String[] equinoxArgs = { "-console", "-noExit", "-clean", "-debug", + // "-configuration", equinoxConfigurationPath }; + String[] equinoxArgs = equinoxArgsLine.split(" "); + + BundleContext context = EclipseStarter.startup(equinoxArgs, null); + + // Load from class path (dev environment, maven) + if (config.getProperty(PROP_SLC_OSGI_SCAN_CLASSPATH, "false").equals( + "true")) { + StringTokenizer st = new StringTokenizer(System + .getProperty("java.class.path"), File.pathSeparator); + while (st.hasMoreTokens()) { + try { + String path = st.nextToken(); + String url = "reference:file:" + + new File(path).getCanonicalPath(); + context.installBundle(url); + info("Installed from classpath " + url); + } catch (Exception e) { + bundleInstallWarn(e.getMessage()); + } + } + } + + // Load from dev bundles + Map devBundleUrls = getDevBundleUrls(config); + Iterator devBundles = devBundleUrls.keySet().iterator(); + while (devBundles.hasNext()) { + try { + String bundleName = (String) devBundles.next(); + String url = (String) devBundleUrls.get(bundleName); + context.installBundle(url); + info("Installed as dev bundle " + url); + } catch (Exception e) { + bundleInstallWarn(e.getMessage()); + } + } + + // Load from distribution + String slcHome = config.getProperty(PROP_SLC_HOME); + if (slcHome != null) { + File libDir = new File(slcHome + File.separator + "lib"); + File[] bundleFiles = libDir.listFiles(); + for (int i = 0; i < bundleFiles.length; i++) { + try { + String url = "reference:file:" + + bundleFiles[i].getCanonicalPath(); + context.installBundle(url); + info("INFO: Installed from SLC home " + url); + } catch (Exception e) { + bundleInstallWarn(e.getMessage()); + } + + } + } + + // Start bundles + String bundleStart = config.getProperty(PROP_SLC_OSGI_START, + "org.springframework.osgi.extender,org.argeo.slc.detached"); + StringTokenizer stBundleStart = new StringTokenizer(bundleStart, ","); + while (stBundleStart.hasMoreTokens()) { + String bundleSymbolicName = stBundleStart.nextToken(); + startBundle(context, bundleSymbolicName); + } + } + + private static Map getDevBundleUrls(Properties config) { + Map bundles = new Hashtable(); + Iterator keys = config.keySet().iterator(); + while (keys.hasNext()) { + String key = (String) keys.next(); + if (key.startsWith(DEV_BUNDLE_PREFIX)) { + String bundle = key.substring(DEV_BUNDLE_PREFIX.length()); + String path = config.getProperty(key); + bundles.put(bundle, path); + } + } + return bundles; + } + + private static void startBundle(BundleContext bundleContext, + String symbolicName) throws BundleException { + info("Starting bundle " + symbolicName + "..."); + Bundle bundle = findBundleBySymbolicName(bundleContext, symbolicName); + if (bundle != null) + bundle.start(); + else + throw new RuntimeException("Bundle " + symbolicName + " not found"); + info("Started " + symbolicName); + } + + /** WARNING: return the first one found! */ + private static Bundle findBundleBySymbolicName(BundleContext bundleContext, + String symbolicName) { + Bundle[] bundles = bundleContext.getBundles(); + for (int i = 0; i < bundles.length; i++) { + Bundle bundle = bundles[i]; + String bundleSymbolicName = bundle.getSymbolicName(); + if (bundleSymbolicName == null) + throw new RuntimeException("Bundle " + bundle.getBundleId() + + " (" + bundle.getLocation() + + ") has no symbolic name."); + + if (bundleSymbolicName.equals(symbolicName)) { + return bundle; + } + } + return null; + } + + public static void startApp(Properties config) throws Exception { + String className = config.getProperty("slc.detached.appclass"); + String[] uiArgs = readArgumentsFromLine(config.getProperty( + "slc.detached.appargs", "")); + + if (className == null) { + info("No slc.detached.appclass property define: does not try to launch an app from the standard classpath."); + } else { + // Launch main method using reflection + Class clss = Class.forName(className); + Class[] mainArgsClasses = new Class[] { uiArgs.getClass() }; + Object[] mainArgs = { uiArgs }; + Method mainMethod = clss.getMethod("main", mainArgsClasses); + mainMethod.invoke(null, mainArgs); + } + } + + /* UTILITIES */ + + /** + * Transform a line into an array of arguments, taking "" as single + * arguments. (nested \" are not supported) + */ + private static String[] readArgumentsFromLine(String lineOrig) { + + String line = lineOrig.trim();// remove trailing spaces + // System.out.println("line=" + line); + List args = new Vector(); + StringBuffer curr = new StringBuffer(""); + boolean inQuote = false; + char[] arr = line.toCharArray(); + for (int i = 0; i < arr.length; i++) { + char c = arr[i]; + switch (c) { + case '\"': + inQuote = !inQuote; + break; + case ' ': + if (!inQuote) {// otherwise, no break: goes to default + if (curr.length() > 0) { + args.add(curr.toString()); + curr = new StringBuffer(""); + } + break; + } + default: + curr.append(c); + break; + } + } + + // Add last arg + if (curr.length() > 0) { + args.add(curr.toString()); + curr = null; + } + + String[] res = new String[args.size()]; + for (int i = 0; i < args.size(); i++) { + res[i] = args.get(i).toString(); + // System.out.println("res[i]=" + res[i]); + } + return res; + } + + private static void info(Object obj) { + System.out.println("[INFO] " + obj); + } + + private static void bundleInstallWarn(Object obj) { + System.err.println("[WARN] " + obj); + } +} diff --git a/runtime/org.argeo.slc.launcher/src/main/resources/META-INF/MANIFEST.MF b/runtime/org.argeo.slc.launcher/src/main/resources/META-INF/MANIFEST.MF index 8564dcb11..cc5f22e47 100644 --- a/runtime/org.argeo.slc.launcher/src/main/resources/META-INF/MANIFEST.MF +++ b/runtime/org.argeo.slc.launcher/src/main/resources/META-INF/MANIFEST.MF @@ -1,21 +1,21 @@ Manifest-Version: 1.0 Created-By: 1.5.0_16 (Sun Microsystems Inc.) Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Import-Package: org.apache.commons.cli;resolution:=optional;version="1 - .1",org.apache.commons.io;version="1.4",org.apache.commons.logging;ve - rsion="1.1",org.argeo.slc;version="0.11.2.SNAPSHOT",org.argeo.slc.bui - ld;version="0.11.2.SNAPSHOT",org.argeo.slc.cli;version="0.11.2.SNAPSH - OT",org.argeo.slc.deploy;version="0.11.2.SNAPSHOT",org.argeo.slc.logg - ing;version="0.11.2.SNAPSHOT",org.argeo.slc.maven;version="0.11.2.SNA - PSHOT",org.argeo.slc.runtime;version="0.11.2.SNAPSHOT",org.argeo.slc. - support.deploy.ant;version="0.11.2.SNAPSHOT",org.argeo.slc.test.sprin - g +Import-Package: org.apache.commons.cli;version="1.1",org.apache.common + s.io;version="1.4",org.apache.commons.logging;version="1.1",org.argeo + .slc;version="0.11.2.SNAPSHOT",org.argeo.slc.build;version="0.11.2.SN + APSHOT",org.argeo.slc.cli;version="0.11.2.SNAPSHOT",org.argeo.slc.dep + loy;version="0.11.2.SNAPSHOT",org.argeo.slc.logging;version="0.11.2.S + NAPSHOT",org.argeo.slc.maven;version="0.11.2.SNAPSHOT",org.argeo.slc. + runtime;version="0.11.2.SNAPSHOT",org.argeo.slc.support.deploy.ant;ve + rsion="0.11.2.SNAPSHOT",org.eclipse.core.runtime.adaptor,org.osgi.fra + mework;version="1.4" Export-Package: org.argeo.slc.support.deploy.ant;version="0.11.2.SNAPS HOT",org.argeo.slc.maven;uses:="org.argeo.slc.build,org.argeo.slc.dep loy";version="0.11.2.SNAPSHOT",org.argeo.slc.cli;uses:="org.argeo.slc - ,org.argeo.slc.logging,org.argeo.slc.runtime,org.apache.commons.io,or - g.apache.commons.logging,org.apache.commons.cli";version="0.11.2.SNAP - SHOT" + ,org.osgi.framework,org.apache.commons.logging,org.argeo.slc.logging, + org.apache.commons.io,org.argeo.slc.runtime,org.eclipse.core.runtime. + adaptor,org.apache.commons.cli";version="0.11.2.SNAPSHOT" Bundle-Version: 0.11.2.SNAPSHOT Bundle-Name: Argeo SLC Launcher Bundle-Description: SLC Distribution diff --git a/runtime/org.argeo.slc.support.ant/pom.xml b/runtime/org.argeo.slc.support.ant/pom.xml index 11320996e..dd3ec7e74 100644 --- a/runtime/org.argeo.slc.support.ant/pom.xml +++ b/runtime/org.argeo.slc.support.ant/pom.xml @@ -68,9 +68,5 @@ org.apache.bsf com.springsource.org.apache.bsf - - org.beanshell - com.springsource.bsh - \ No newline at end of file diff --git a/runtime/org.argeo.slc.support.castor/pom.xml b/runtime/org.argeo.slc.support.castor/pom.xml index 0af0f021f..81dc9b235 100644 --- a/runtime/org.argeo.slc.support.castor/pom.xml +++ b/runtime/org.argeo.slc.support.castor/pom.xml @@ -37,7 +37,13 @@ org.argeo.slc.* - *,org.apache.commons.logging;version="1.1" + *,javax.xml.parsers;resolution:=optional, + javax.xml.transform;resolution:=optional, + javax.xml.transform.dom;resolution:=optional, + javax.xml.transform.stream;resolution:=optional, + org.w3c.dom;resolution:=optional, + org.xml.sax;resolution:=optional + @@ -67,6 +73,11 @@ com.springsource.org.apache.xerces + + org.apache.xalan + com.springsource.org.apache.xalan + + javax.xml.stream com.springsource.javax.xml.stream diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/core/process/FileSlcExecutionNotifier.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/core/process/FileSlcExecutionNotifier.java deleted file mode 100644 index f7aa6840b..000000000 --- a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/core/process/FileSlcExecutionNotifier.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.argeo.slc.core.process; - -import java.io.File; -import java.io.FileWriter; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.io.IOUtils; -import org.argeo.slc.SlcException; -import org.argeo.slc.process.SlcExecution; -import org.argeo.slc.process.SlcExecutionNotifier; -import org.argeo.slc.process.SlcExecutionStep; -import org.springframework.oxm.Marshaller; - -public class FileSlcExecutionNotifier implements SlcExecutionNotifier { - private final static SimpleDateFormat sdf = new SimpleDateFormat( - "yyyyMMdd-HHmmss"); - - private String basePath; - private Marshaller marshaller; - - private Map uuidToDir = new HashMap(); - - public void addSteps(SlcExecution slcExecution, - List additionalSteps) { - writeSlcExecution(slcExecution); - } - - public void newExecution(SlcExecution slcExecution) { - String dirPath = basePath + File.separator + sdf.format(new Date()) - + '-' + slcExecution.getUuid(); - File dir = new File(dirPath); - dir.mkdirs(); - - uuidToDir.put(slcExecution.getUuid(), dirPath); - - writeSlcExecution(slcExecution); - } - - public void updateExecution(SlcExecution slcExecution) { - writeSlcExecution(slcExecution); - } - - public void updateStatus(SlcExecution slcExecution, String oldStatus, - String newStatus) { - writeSlcExecution(slcExecution); - } - - protected void writeSlcExecution(SlcExecution slcExecution) { - FileWriter out = null; - try { - out = new FileWriter(getFilePath(slcExecution)); - marshaller.marshal(slcExecution, new StreamResult(out)); - } catch (Exception e) { - throw new SlcException("Cannot marshall SlcExecution to " - + getFilePath(slcExecution), e); - } finally { - IOUtils.closeQuietly(out); - } - } - - protected String getFileName(SlcExecution slcExecution) { - return "SlcExecution-" + slcExecution.getUuid() + ".xml"; - } - - protected String getFilePath(SlcExecution slcExecution) { - String dirPath = uuidToDir.get(slcExecution.getUuid()); - return dirPath + File.separator + "SlcExecution-" - + slcExecution.getUuid() + ".xml"; - } - - public void setBasePath(String basePath) { - this.basePath = basePath; - } - - public void setMarshaller(Marshaller marshaller) { - this.marshaller = marshaller; - } - -} diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/core/test/tree/XsltReportGenerator.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/core/test/tree/XsltReportGenerator.java deleted file mode 100644 index 3bb7cd466..000000000 --- a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/core/test/tree/XsltReportGenerator.java +++ /dev/null @@ -1,156 +0,0 @@ -package org.argeo.slc.core.test.tree; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.OutputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Templates; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.springframework.core.io.Resource; -import org.springframework.oxm.Marshaller; -import org.springframework.xml.transform.StringResult; -import org.w3c.dom.Document; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.argeo.slc.SlcException; -import org.argeo.slc.test.TestResultListener; -import org.argeo.slc.test.TestResultPart; - -public class XsltReportGenerator implements TestResultListener { - private Log log = LogFactory.getLog(getClass()); - - private DocumentBuilder documentBuilder = null; - - private Resource xsltStyleSheet; - - private Templates templates; - - private Marshaller marshaller; - - private String outputDir; - private String outputFileExtension = "html"; - - private Boolean logXml = false; - - public void init() { - if (templates != null) - return; - - if (xsltStyleSheet == null) - throw new SlcException("XSLT style sheet not specified."); - - InputStream in = null; - try { - TransformerFactory transformerFactory = TransformerFactory - .newInstance(); - in = xsltStyleSheet.getInputStream(); - StreamSource xsltSource = new StreamSource(in); - templates = transformerFactory.newTemplates(xsltSource); - } catch (Exception e) { - throw new SlcException("Could not initialize templates", e); - } finally { - IOUtils.closeQuietly(in); - } - } - - public void resultPartAdded(TreeTestResult testResult, - TestResultPart testResultPart) { - - } - - public void close(TreeTestResult testResult) { - if (templates == null) - throw new SlcException("XSLT template not initialized"); - - File file = getFile(testResult); - OutputStream out = null; - - try { - Transformer transformer = templates.newTransformer(); - - if (documentBuilder == null) - documentBuilder = DocumentBuilderFactory.newInstance() - .newDocumentBuilder(); - - Document document = documentBuilder.newDocument(); - DOMResult marshallResult = new DOMResult(document); - marshaller.marshal(testResult, marshallResult); - - if (logXml) { - Transformer identityTransformer = TransformerFactory - .newInstance().newTransformer(); - StringResult xmlResult = new StringResult(); - identityTransformer.transform(new DOMSource(marshallResult - .getNode()), xmlResult); - log.info("Marshalled XML:\n" + xmlResult); - } - - DOMSource transfoSource = new DOMSource(marshallResult.getNode()); - - if (outputDir != null) { - File dir = new File(outputDir); - dir.mkdirs(); - out = new FileOutputStream(file); - StreamResult outputResult = new StreamResult(out); - transformer.transform(transfoSource, outputResult); - } else { - // print on console if no output dir - StringResult result = new StringResult(); - transformer.transform(transfoSource, result); - log.info("Generated report:\n" + result); - } - } catch (Exception e) { - throw new SlcException( - "Could not transform test result to " + file, e); - } finally { - IOUtils.closeQuietly(out); - } - } - - public Resource getXsltStyleSheet() { - return xsltStyleSheet; - } - - public void setXsltStyleSheet(Resource xsltStyleSheet) { - this.xsltStyleSheet = xsltStyleSheet; - } - - public void setTemplates(Templates templates) { - this.templates = templates; - } - - public void setMarshaller(Marshaller marshaller) { - this.marshaller = marshaller; - } - - public void setOutputDir(String outputDir) { - this.outputDir = outputDir; - } - - public void setOutputFileExtension(String outputFileExtension) { - this.outputFileExtension = outputFileExtension; - } - - protected File getFile(TreeTestResult result) { - Long time = System.currentTimeMillis(); - return new File(outputDir + File.separator + time + "-" - + result.getUuid() + "." + outputFileExtension); - } - - public void setLogXml(Boolean logXml) { - this.logXml = logXml; - } - -} diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java new file mode 100644 index 000000000..f16b4e789 --- /dev/null +++ b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/process/FileSlcExecutionNotifier.java @@ -0,0 +1,85 @@ +package org.argeo.slc.xml.process; + +import java.io.File; +import java.io.FileWriter; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.transform.stream.StreamResult; + +import org.apache.commons.io.IOUtils; +import org.argeo.slc.SlcException; +import org.argeo.slc.process.SlcExecution; +import org.argeo.slc.process.SlcExecutionNotifier; +import org.argeo.slc.process.SlcExecutionStep; +import org.springframework.oxm.Marshaller; + +public class FileSlcExecutionNotifier implements SlcExecutionNotifier { + private final static SimpleDateFormat sdf = new SimpleDateFormat( + "yyyyMMdd-HHmmss"); + + private String basePath; + private Marshaller marshaller; + + private Map uuidToDir = new HashMap(); + + public void addSteps(SlcExecution slcExecution, + List additionalSteps) { + writeSlcExecution(slcExecution); + } + + public void newExecution(SlcExecution slcExecution) { + String dirPath = basePath + File.separator + sdf.format(new Date()) + + '-' + slcExecution.getUuid(); + File dir = new File(dirPath); + dir.mkdirs(); + + uuidToDir.put(slcExecution.getUuid(), dirPath); + + writeSlcExecution(slcExecution); + } + + public void updateExecution(SlcExecution slcExecution) { + writeSlcExecution(slcExecution); + } + + public void updateStatus(SlcExecution slcExecution, String oldStatus, + String newStatus) { + writeSlcExecution(slcExecution); + } + + protected void writeSlcExecution(SlcExecution slcExecution) { + FileWriter out = null; + try { + out = new FileWriter(getFilePath(slcExecution)); + marshaller.marshal(slcExecution, new StreamResult(out)); + } catch (Exception e) { + throw new SlcException("Cannot marshall SlcExecution to " + + getFilePath(slcExecution), e); + } finally { + IOUtils.closeQuietly(out); + } + } + + protected String getFileName(SlcExecution slcExecution) { + return "SlcExecution-" + slcExecution.getUuid() + ".xml"; + } + + protected String getFilePath(SlcExecution slcExecution) { + String dirPath = uuidToDir.get(slcExecution.getUuid()); + return dirPath + File.separator + "SlcExecution-" + + slcExecution.getUuid() + ".xml"; + } + + public void setBasePath(String basePath) { + this.basePath = basePath; + } + + public void setMarshaller(Marshaller marshaller) { + this.marshaller = marshaller; + } + +} diff --git a/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java new file mode 100644 index 000000000..51ad392b7 --- /dev/null +++ b/runtime/org.argeo.slc.support.castor/src/main/java/org/argeo/slc/xml/test/tree/XsltReportGenerator.java @@ -0,0 +1,157 @@ +package org.argeo.slc.xml.test.tree; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Templates; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMResult; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.springframework.core.io.Resource; +import org.springframework.oxm.Marshaller; +import org.springframework.xml.transform.StringResult; +import org.w3c.dom.Document; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.argeo.slc.SlcException; +import org.argeo.slc.core.test.tree.TreeTestResult; +import org.argeo.slc.test.TestResultListener; +import org.argeo.slc.test.TestResultPart; + +public class XsltReportGenerator implements TestResultListener { + private Log log = LogFactory.getLog(getClass()); + + private DocumentBuilder documentBuilder = null; + + private Resource xsltStyleSheet; + + private Templates templates; + + private Marshaller marshaller; + + private String outputDir; + private String outputFileExtension = "html"; + + private Boolean logXml = false; + + public void init() { + if (templates != null) + return; + + if (xsltStyleSheet == null) + throw new SlcException("XSLT style sheet not specified."); + + InputStream in = null; + try { + TransformerFactory transformerFactory = TransformerFactory + .newInstance(); + in = xsltStyleSheet.getInputStream(); + StreamSource xsltSource = new StreamSource(in); + templates = transformerFactory.newTemplates(xsltSource); + } catch (Exception e) { + throw new SlcException("Could not initialize templates", e); + } finally { + IOUtils.closeQuietly(in); + } + } + + public void resultPartAdded(TreeTestResult testResult, + TestResultPart testResultPart) { + + } + + public void close(TreeTestResult testResult) { + if (templates == null) + throw new SlcException("XSLT template not initialized"); + + File file = getFile(testResult); + OutputStream out = null; + + try { + Transformer transformer = templates.newTransformer(); + + if (documentBuilder == null) + documentBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + + Document document = documentBuilder.newDocument(); + DOMResult marshallResult = new DOMResult(document); + marshaller.marshal(testResult, marshallResult); + + if (logXml) { + Transformer identityTransformer = TransformerFactory + .newInstance().newTransformer(); + StringResult xmlResult = new StringResult(); + identityTransformer.transform(new DOMSource(marshallResult + .getNode()), xmlResult); + log.info("Marshalled XML:\n" + xmlResult); + } + + DOMSource transfoSource = new DOMSource(marshallResult.getNode()); + + if (outputDir != null) { + File dir = new File(outputDir); + dir.mkdirs(); + out = new FileOutputStream(file); + StreamResult outputResult = new StreamResult(out); + transformer.transform(transfoSource, outputResult); + } else { + // print on console if no output dir + StringResult result = new StringResult(); + transformer.transform(transfoSource, result); + log.info("Generated report:\n" + result); + } + } catch (Exception e) { + throw new SlcException( + "Could not transform test result to " + file, e); + } finally { + IOUtils.closeQuietly(out); + } + } + + public Resource getXsltStyleSheet() { + return xsltStyleSheet; + } + + public void setXsltStyleSheet(Resource xsltStyleSheet) { + this.xsltStyleSheet = xsltStyleSheet; + } + + public void setTemplates(Templates templates) { + this.templates = templates; + } + + public void setMarshaller(Marshaller marshaller) { + this.marshaller = marshaller; + } + + public void setOutputDir(String outputDir) { + this.outputDir = outputDir; + } + + public void setOutputFileExtension(String outputFileExtension) { + this.outputFileExtension = outputFileExtension; + } + + protected File getFile(TreeTestResult result) { + Long time = System.currentTimeMillis(); + return new File(outputDir + File.separator + time + "-" + + result.getUuid() + "." + outputFileExtension); + } + + public void setLogXml(Boolean logXml) { + this.logXml = logXml; + } + +} diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/META-INF/MANIFEST.MF b/runtime/org.argeo.slc.support.castor/src/main/resources/META-INF/MANIFEST.MF index d3048b78b..74248c7ff 100644 --- a/runtime/org.argeo.slc.support.castor/src/main/resources/META-INF/MANIFEST.MF +++ b/runtime/org.argeo.slc.support.castor/src/main/resources/META-INF/MANIFEST.MF @@ -1,53 +1,57 @@ Manifest-Version: 1.0 -Created-By: 1.5.0_16 (Sun Microsystems Inc.) -Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Import-Package: javax.xml.parsers;version="1.3",javax.xml.transform;ve - rsion="1.3",javax.xml.transform.dom;version="1.3",javax.xml.transform - .stream;version="1.3",junit.framework;version="3.8",org.apache.common - s.io;version="1.4",org.apache.commons.logging;version="1.1",org.argeo - .slc;version="0.11.2.SNAPSHOT",org.argeo.slc.castor;version="0.11.2.S - NAPSHOT",org.argeo.slc.castor.msg;version="0.11.2.SNAPSHOT",org.argeo - .slc.castor.process;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.sp - ring;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.structure;version - ="0.11.2.SNAPSHOT",org.argeo.slc.castor.structure.tree;version="0.11. - 2.SNAPSHOT",org.argeo.slc.castor.test;version="0.11.2.SNAPSHOT",org.a - rgeo.slc.castor.test.tree;version="0.11.2.SNAPSHOT",org.argeo.slc.cor - e.process;version="0.11.2.SNAPSHOT",org.argeo.slc.core.structure.tree - ;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test;version="0.11.2.SN - APSHOT",org.argeo.slc.core.test.tree;version="0.11.2.SNAPSHOT",org.ar - geo.slc.process;version="0.11.2.SNAPSHOT",org.argeo.slc.test;version= - "0.11.2.SNAPSHOT",org.argeo.slc.unit;version="0.11.2.SNAPSHOT",org.ex - olab.castor.mapping;version="1.2",org.springframework.core.io;version - ="2.5.6.A",org.springframework.oxm;version="1.5.5.A",org.springframew - ork.xml.transform;version="1.5.5.A",org.springframework.xml.validatio - n;version="1.5.5.A",org.springframework.xml.xsd;version="1.5.5.A",org - .w3c.dom;version="1.3",org.xml.sax;version="1.3" -Export-Package: org.argeo.slc.core.test.tree;uses:="org.argeo.slc,org. - argeo.slc.test,org.w3c.dom,org.apache.commons.logging,org.springframe - work.oxm,javax.xml.transform,javax.xml.transform.dom,org.springframew - ork.core.io,javax.xml.parsers,org.apache.commons.io,javax.xml.transfo - rm.stream,org.springframework.xml.transform";version="0.11.2.SNAPSHOT - ",org.argeo.slc.castor.test.tree;uses:="org.argeo.slc.test,org.argeo. - slc.core.test,org.exolab.castor.mapping";version="0.11.2.SNAPSHOT",or - g.argeo.slc.unit;uses:="org.xml.sax,org.springframework.xml.xsd,org.a - pache.commons.logging,junit.framework,org.springframework.xml.validat - ion,javax.xml.transform";version="0.11.2.SNAPSHOT",org.argeo.slc.cast - or.process;version="0.11.2.SNAPSHOT",org.argeo.slc.core.process;uses: - ="org.argeo.slc,org.argeo.slc.process,org.apache.commons.io,javax.xml - .transform.stream,org.springframework.oxm,javax.xml.transform";versio - n="0.11.2.SNAPSHOT",org.argeo.slc.castor.structure.tree;uses:="org.ex - olab.castor.mapping,org.argeo.slc.core.structure.tree";version="0.11. - 2.SNAPSHOT",org.argeo.slc.castor.structure;version="0.11.2.SNAPSHOT", - org.argeo.slc.castor.msg;version="0.11.2.SNAPSHOT",org.argeo.slc.cast - or.test;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.spring;version - ="0.11.2.SNAPSHOT",org.argeo.slc.castor;version="0.11.2.SNAPSHOT" -Bundle-Version: 0.11.2.SNAPSHOT +Export-Package: org.argeo.slc.castor.msg;version="0.11.2.SNAPSHOT",org + .argeo.slc.castor.process;version="0.11.2.SNAPSHOT",org.argeo.slc.cas + tor.test;version="0.11.2.SNAPSHOT",org.argeo.slc.xml.test.tree;uses:= + "org.springframework.oxm,org.apache.commons.logging,org.argeo.slc.tes + t,org.springframework.xml.transform,org.springframework.core.io,javax + .xml.parsers,org.argeo.slc.core.test.tree,javax.xml.transform.dom,org + .w3c.dom,javax.xml.transform,javax.xml.transform.stream,org.apache.co + mmons.io,org.argeo.slc";version="0.11.2.SNAPSHOT",org.argeo.slc.casto + r.structure.tree;uses:="org.exolab.castor.mapping,org.argeo.slc.core. + structure.tree";version="0.11.2.SNAPSHOT",org.argeo.slc.castor.struct + ure;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.spring;version="0. + 11.2.SNAPSHOT",org.argeo.slc.castor.test.tree;uses:="org.argeo.slc.te + st,org.exolab.castor.mapping,org.argeo.slc.core.test";version="0.11.2 + .SNAPSHOT",org.argeo.slc.unit;uses:="org.apache.commons.logging,junit + .framework,javax.xml.transform,org.springframework.xml.xsd,org.spring + framework.xml.validation,org.xml.sax";version="0.11.2.SNAPSHOT",org.a + rgeo.slc.xml.process;uses:="org.springframework.oxm,javax.xml.transfo + rm,org.argeo.slc.process,javax.xml.transform.stream,org.apache.common + s.io,org.argeo.slc";version="0.11.2.SNAPSHOT",org.argeo.slc.castor;ve + rsion="0.11.2.SNAPSHOT" +Tool: Bnd-0.0.255 Bundle-Name: Argeo SLC Support Castor +Created-By: 1.6.0 (Sun Microsystems Inc.) +Bundle-Vendor: Argeo +Bundle-Version: 0.11.2.SNAPSHOT +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-Description: Implementations of SLC Specs using Castor +Import-Package: javax.xml.parsers;resolution:=optional;version="1.3",j + avax.xml.transform;resolution:=optional;version="1.3",javax.xml.trans + form.dom;resolution:=optional;version="1.3",javax.xml.transform.strea + m;resolution:=optional;version="1.3",junit.framework;version="3.8",or + g.apache.commons.io;version="1.4",org.apache.commons.logging;version= + "1.1",org.argeo.slc;version="0.11.2.SNAPSHOT",org.argeo.slc.castor;ve + rsion="0.11.2.SNAPSHOT",org.argeo.slc.castor.msg;version="0.11.2.SNAP + SHOT",org.argeo.slc.castor.process;version="0.11.2.SNAPSHOT",org.arge + o.slc.castor.spring;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.st + ructure;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.structure.tree + ;version="0.11.2.SNAPSHOT",org.argeo.slc.castor.test;version="0.11.2. + SNAPSHOT",org.argeo.slc.castor.test.tree;version="0.11.2.SNAPSHOT",or + g.argeo.slc.core.structure.tree;version="0.11.2.SNAPSHOT",org.argeo.s + lc.core.test;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.tree;v + ersion="0.11.2.SNAPSHOT",org.argeo.slc.process;version="0.11.2.SNAPSH + OT",org.argeo.slc.test;version="0.11.2.SNAPSHOT",org.argeo.slc.unit;v + ersion="0.11.2.SNAPSHOT",org.argeo.slc.xml.process;version="0.11.2.SN + APSHOT",org.argeo.slc.xml.test.tree;version="0.11.2.SNAPSHOT",org.exo + lab.castor.mapping;version="1.2",org.springframework.core.io;version= + "2.5.6.A",org.springframework.oxm;version="1.5.5.A",org.springframewo + rk.xml.transform;version="1.5.5.A",org.springframework.xml.validation + ;version="1.5.5.A",org.springframework.xml.xsd;version="1.5.5.A",org. + w3c.dom;resolution:=optional;version="1.3",org.xml.sax;resolution:=op + tional;version="1.3" +Bundle-SymbolicName: org.argeo.slc.support.castor Bundle-DocURL: http://www.argeo.org Originally-Created-By: 1.6.0 (Sun Microsystems Inc.) -Bundle-ManifestVersion: 2 -Bundle-Vendor: Argeo -Bundle-SymbolicName: org.argeo.slc.support.castor -Tool: Bnd-0.0.255 diff --git a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring/applicationContext.xml b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring/applicationContext.xml index 45a470a3f..414a2f49a 100644 --- a/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring/applicationContext.xml +++ b/runtime/org.argeo.slc.support.castor/src/main/resources/org/argeo/slc/castor/spring/applicationContext.xml @@ -25,7 +25,7 @@ @@ -34,5 +34,10 @@ + + + + diff --git a/runtime/org.argeo.slc.support.simple/pom.xml b/runtime/org.argeo.slc.support.simple/pom.xml index 42534e229..1680c2722 100644 --- a/runtime/org.argeo.slc.support.simple/pom.xml +++ b/runtime/org.argeo.slc.support.simple/pom.xml @@ -37,7 +37,13 @@ org.argeo.slc.* - *,org.apache.commons.logging;version="1.1" + *,org.apache.commons.logging;version="1.1", + org.dbunit;resolution:="optional", + org.dbunit.database;resolution:="optional", + org.dbunit.dataset;resolution:="optional", + org.dbunit.dataset.xml;resolution:="optional", + org.dbunit.operation;resolution:="optional" + @@ -73,5 +79,12 @@ org.junit com.springsource.junit + + + + org.apache.commons + com.springsource.org.apache.commons.collections + + \ No newline at end of file diff --git a/runtime/org.argeo.slc.support.simple/src/main/resources/META-INF/MANIFEST.MF b/runtime/org.argeo.slc.support.simple/src/main/resources/META-INF/MANIFEST.MF index 7a603c152..3ca2f5c54 100644 --- a/runtime/org.argeo.slc.support.simple/src/main/resources/META-INF/MANIFEST.MF +++ b/runtime/org.argeo.slc.support.simple/src/main/resources/META-INF/MANIFEST.MF @@ -6,32 +6,33 @@ Import-Package: javax.sql,junit.framework;version="3.8",org.apache.com ache.log4j;version="1.2",org.argeo.slc;version="0.11.2.SNAPSHOT",org. argeo.slc.build;version="0.11.2.SNAPSHOT",org.argeo.slc.core.build;ve rsion="0.11.2.SNAPSHOT",org.argeo.slc.core.deploy;version="0.11.2.SNA - PSHOT",org.argeo.slc.core.process.spring;version="0.11.2.SNAPSHOT",or - g.argeo.slc.core.structure;version="0.11.2.SNAPSHOT",org.argeo.slc.co - re.structure.tree;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test;v - ersion="0.11.2.SNAPSHOT",org.argeo.slc.core.test.context;version="0.1 - 1.2.SNAPSHOT",org.argeo.slc.core.test.spring;version="0.11.2.SNAPSHOT - ",org.argeo.slc.core.test.tree;version="0.11.2.SNAPSHOT",org.argeo.sl - c.dao.test;version="0.11.2.SNAPSHOT",org.argeo.slc.dao.test.tree;vers - ion="0.11.2.SNAPSHOT",org.argeo.slc.deploy;version="0.11.2.SNAPSHOT", - org.argeo.slc.diff;version="0.11.2.SNAPSHOT",org.argeo.slc.logging;ve - rsion="0.11.2.SNAPSHOT",org.argeo.slc.msg.process;version="0.11.2.SNA - PSHOT",org.argeo.slc.msg.test.tree;version="0.11.2.SNAPSHOT",org.arge - o.slc.process;version="0.11.2.SNAPSHOT",org.argeo.slc.spring;version= - "0.11.2.SNAPSHOT",org.argeo.slc.structure;version="0.11.2.SNAPSHOT",o - rg.argeo.slc.support.deploy;version="0.11.2.SNAPSHOT",org.argeo.slc.s - upport.deploy.db;version="0.11.2.SNAPSHOT",org.argeo.slc.test;version - ="0.11.2.SNAPSHOT",org.argeo.slc.test.context;version="0.11.2.SNAPSHO - T",org.argeo.slc.unit;version="0.11.2.SNAPSHOT",org.argeo.slc.unit.pr - ocess;version="0.11.2.SNAPSHOT",org.argeo.slc.unit.test.tree;version= - "0.11.2.SNAPSHOT",org.argeo.slc.xml;version="0.11.2.SNAPSHOT",org.arg - eo.slc.xml.spring;version="0.11.2.SNAPSHOT",org.dbunit;version="2.2", - org.dbunit.database;version="2.2",org.dbunit.dataset;version="2.2",or - g.dbunit.dataset.xml;version="2.2",org.dbunit.operation;version="2.2" - ,org.springframework.beans.factory;version="2.5.6.A",org.springframew - ork.context;version="2.5.6.A",org.springframework.context.support;ver - sion="2.5.6.A",org.springframework.core.io;version="2.5.6.A",org.spri - ngframework.util;version="2.5.6.A" + PSHOT",org.argeo.slc.core.structure;version="0.11.2.SNAPSHOT",org.arg + eo.slc.core.structure.tree;version="0.11.2.SNAPSHOT",org.argeo.slc.co + re.test;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.context;ver + sion="0.11.2.SNAPSHOT",org.argeo.slc.core.test.spring;version="0.11.2 + .SNAPSHOT",org.argeo.slc.core.test.tree;version="0.11.2.SNAPSHOT",org + .argeo.slc.dao.test;version="0.11.2.SNAPSHOT",org.argeo.slc.dao.test. + tree;version="0.11.2.SNAPSHOT",org.argeo.slc.deploy;version="0.11.2.S + NAPSHOT",org.argeo.slc.diff;version="0.11.2.SNAPSHOT",org.argeo.slc.l + ogging;version="0.11.2.SNAPSHOT",org.argeo.slc.msg.process;version="0 + .11.2.SNAPSHOT",org.argeo.slc.msg.test.tree;version="0.11.2.SNAPSHOT" + ,org.argeo.slc.process;version="0.11.2.SNAPSHOT",org.argeo.slc.spring + ;version="0.11.2.SNAPSHOT",org.argeo.slc.structure;version="0.11.2.SN + APSHOT",org.argeo.slc.support.deploy;version="0.11.2.SNAPSHOT",org.ar + geo.slc.support.deploy.db;version="0.11.2.SNAPSHOT",org.argeo.slc.tes + t;version="0.11.2.SNAPSHOT",org.argeo.slc.test.context;version="0.11. + 2.SNAPSHOT",org.argeo.slc.unit;version="0.11.2.SNAPSHOT",org.argeo.sl + c.unit.process;version="0.11.2.SNAPSHOT",org.argeo.slc.unit.test.tree + ;version="0.11.2.SNAPSHOT",org.argeo.slc.xml;version="0.11.2.SNAPSHOT + ",org.argeo.slc.xml.spring;version="0.11.2.SNAPSHOT",org.dbunit;resol + ution:=optional;version="2.2",org.dbunit.database;resolution:=optiona + l;version="2.2",org.dbunit.dataset;resolution:=optional;version="2.2" + ,org.dbunit.dataset.xml;resolution:=optional;version="2.2",org.dbunit + .operation;resolution:=optional;version="2.2",org.springframework.bea + ns.factory;version="2.5.6.A",org.springframework.context;version="2.5 + .6.A",org.springframework.context.support;version="2.5.6.A",org.sprin + gframework.core.io;version="2.5.6.A",org.springframework.util;version + ="2.5.6.A" Export-Package: org.argeo.slc.dao.test.tree;uses:="org.argeo.slc.test, org.argeo.slc.core.test.tree,org.argeo.slc.core.test,org.argeo.slc.da o.test,org.apache.commons.logging,org.argeo.slc.core.structure.tree"; @@ -41,47 +42,46 @@ Export-Package: org.argeo.slc.dao.test.tree;uses:="org.argeo.slc.test, o.slc.test.context,org.argeo.slc.test,org.argeo.slc.process,org.argeo .slc.core.test.context,org.apache.commons.logging,org.argeo.slc.core. structure.tree,org.argeo.slc.deploy";version="0.11.2.SNAPSHOT",org.ar - geo.slc.core.process.spring;version="0.11.2.SNAPSHOT",org.argeo.slc.m - sg.process;uses:="org.argeo.slc.process";version="0.11.2.SNAPSHOT",or - g.argeo.slc.unit.process;uses:="org.argeo.slc.process,org.argeo.slc.u - nit,junit.framework";version="0.11.2.SNAPSHOT",org.argeo.slc.core.tes - t.context;uses:="org.argeo.slc,org.argeo.slc.test.context,org.argeo.s - lc.test,org.argeo.slc.core.test,org.apache.commons.logging,org.spring - framework.beans.factory,org.argeo.slc.core.structure.tree,org.argeo.s - lc.structure";version="0.11.2.SNAPSHOT",org.argeo.slc.core.build;vers - ion="0.11.2.SNAPSHOT",org.argeo.slc.core.test.spring;version="0.11.2. - SNAPSHOT",org.argeo.slc.xml.spring;version="0.11.2.SNAPSHOT",org.arge - o.slc.support.deploy;uses:="org.argeo.slc,org.argeo.slc.build,org.apa - che.commons.logging,org.argeo.slc.deploy";version="0.11.2.SNAPSHOT",o - rg.argeo.slc.support.deploy.db;uses:="org.argeo.slc,org.dbunit.databa - se,org.dbunit.dataset.xml,org.argeo.slc.build,org.apache.commons.logg - ing,org.dbunit,javax.sql,org.dbunit.dataset,org.springframework.core. - io,org.dbunit.operation,org.argeo.slc.deploy";version="0.11.2.SNAPSHO - T",org.argeo.slc.logging;uses:="org.argeo.slc,org.apache.log4j,org.sp - ringframework.core.io,org.apache.commons.io,org.springframework.util" - ;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.tree;uses:="org.ar - geo.slc,org.argeo.slc.test,org.apache.commons.logging,org.argeo.slc.c - ore.structure.tree,org.argeo.slc.structure,org.argeo.slc.core.structu - re";version="0.11.2.SNAPSHOT",org.argeo.slc.msg.test.tree;uses:="org. - argeo.slc,org.argeo.slc.test,org.argeo.slc.core.test.tree,org.argeo.s - lc.core.test,org.argeo.slc.core.structure.tree";version="0.11.2.SNAPS - HOT",org.argeo.slc.xml;version="0.11.2.SNAPSHOT",org.argeo.slc.unit;u - ses:="org.argeo.slc,org.apache.commons.logging,junit.framework,org.ar - geo.slc.spring,org.springframework.context,org.springframework.contex - t.support,org.springframework.beans.factory";version="0.11.2.SNAPSHOT - ",org.argeo.slc.unit.test.tree;uses:="org.argeo.slc.test,org.argeo.sl - c.core.test,org.argeo.slc.unit.process,org.argeo.slc.build,org.apache - .commons.logging,org.argeo.slc.structure,org.argeo.slc.core.test.tree - ,org.argeo.slc.msg.test.tree,org.argeo.slc.unit,org.argeo.slc.process - ,junit.framework,org.argeo.slc.core.structure.tree,org.argeo.slc.core - .structure,org.argeo.slc.deploy";version="0.11.2.SNAPSHOT",org.argeo. - slc.diff;uses:="org.argeo.slc,org.springframework.core.io";version="0 - .11.2.SNAPSHOT",org.argeo.slc.spring;uses:="org.argeo.slc,org.springf - ramework.core.io,org.apache.commons.logging,org.springframework.beans - .factory";version="0.11.2.SNAPSHOT",org.argeo.slc.core.structure.tree - ;uses:="org.argeo.slc,org.argeo.slc.structure,org.argeo.slc.core.stru - cture";version="0.11.2.SNAPSHOT",org.argeo.slc.core.structure;uses:=" - org.argeo.slc.structure";version="0.11.2.SNAPSHOT" + geo.slc.msg.process;uses:="org.argeo.slc.process";version="0.11.2.SNA + PSHOT",org.argeo.slc.unit.process;uses:="org.argeo.slc.process,org.ar + geo.slc.unit,junit.framework";version="0.11.2.SNAPSHOT",org.argeo.slc + .core.test.context;uses:="org.argeo.slc,org.argeo.slc.test.context,or + g.argeo.slc.test,org.argeo.slc.core.test,org.apache.commons.logging,o + rg.springframework.beans.factory,org.argeo.slc.core.structure.tree,or + g.argeo.slc.structure";version="0.11.2.SNAPSHOT",org.argeo.slc.core.b + uild;version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.spring;version + ="0.11.2.SNAPSHOT",org.argeo.slc.xml.spring;version="0.11.2.SNAPSHOT" + ,org.argeo.slc.support.deploy;uses:="org.argeo.slc,org.argeo.slc.buil + d,org.apache.commons.logging,org.argeo.slc.deploy";version="0.11.2.SN + APSHOT",org.argeo.slc.logging;uses:="org.argeo.slc,org.apache.log4j,o + rg.springframework.core.io,org.apache.commons.io,org.springframework. + util";version="0.11.2.SNAPSHOT",org.argeo.slc.core.test.tree;uses:="o + rg.argeo.slc,org.argeo.slc.test,org.apache.commons.logging,org.argeo. + slc.core.structure.tree,org.argeo.slc.structure,org.argeo.slc.core.st + ructure";version="0.11.2.SNAPSHOT",org.argeo.slc.support.deploy.db;us + es:="org.argeo.slc,org.dbunit.database,org.dbunit.dataset.xml,org.arg + eo.slc.build,org.apache.commons.logging,org.dbunit,javax.sql,org.dbun + it.dataset,org.springframework.core.io,org.dbunit.operation,org.argeo + .slc.deploy";version="0.11.2.SNAPSHOT",org.argeo.slc.msg.test.tree;us + es:="org.argeo.slc,org.argeo.slc.test,org.argeo.slc.core.test.tree,or + g.argeo.slc.core.test,org.argeo.slc.core.structure.tree";version="0.1 + 1.2.SNAPSHOT",org.argeo.slc.xml;version="0.11.2.SNAPSHOT",org.argeo.s + lc.unit;uses:="org.argeo.slc,org.apache.commons.logging,junit.framewo + rk,org.argeo.slc.spring,org.springframework.context,org.springframewo + rk.context.support,org.springframework.beans.factory";version="0.11.2 + .SNAPSHOT",org.argeo.slc.unit.test.tree;uses:="org.argeo.slc.test,org + .argeo.slc.core.test,org.argeo.slc.unit.process,org.argeo.slc.build,o + rg.apache.commons.logging,org.argeo.slc.structure,org.argeo.slc.core. + test.tree,org.argeo.slc.msg.test.tree,org.argeo.slc.unit,org.argeo.sl + c.process,junit.framework,org.argeo.slc.core.structure.tree,org.argeo + .slc.core.structure,org.argeo.slc.deploy";version="0.11.2.SNAPSHOT",o + rg.argeo.slc.diff;uses:="org.argeo.slc,org.springframework.core.io";v + ersion="0.11.2.SNAPSHOT",org.argeo.slc.spring;uses:="org.argeo.slc,or + g.springframework.core.io,org.apache.commons.logging,org.springframew + ork.beans.factory";version="0.11.2.SNAPSHOT",org.argeo.slc.core.struc + ture.tree;uses:="org.argeo.slc,org.argeo.slc.structure,org.argeo.slc. + core.structure";version="0.11.2.SNAPSHOT",org.argeo.slc.core.structur + e;uses:="org.argeo.slc.structure";version="0.11.2.SNAPSHOT" Bundle-Version: 0.11.2.SNAPSHOT Bundle-Name: Argeo SLC Support Simple Bundle-Description: Basic implementations of SLC Specifications diff --git a/runtime/org.argeo.slc.support.simple/src/main/resources/org/argeo/slc/core/process/spring/applicationContext.xml b/runtime/org.argeo.slc.support.simple/src/main/resources/org/argeo/slc/core/process/spring/applicationContext.xml deleted file mode 100644 index 45bcac91a..000000000 --- a/runtime/org.argeo.slc.support.simple/src/main/resources/org/argeo/slc/core/process/spring/applicationContext.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - \ No newline at end of file