+ refactor to separate runtime and module project under eclipse plugin.
authorBruno Sinou <bsinou@argeo.org>
Mon, 8 Nov 2010 16:07:54 +0000 (16:07 +0000)
committerBruno Sinou <bsinou@argeo.org>
Mon, 8 Nov 2010 16:07:54 +0000 (16:07 +0000)
+ add some pom to prepare the deployment
+ clean client rcp & ui project (change src & target folder)

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

eclipse/plugins/runtime/org.argeo.slc.client.oxm/.classpath [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/.project [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/MANIFEST.MF [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/spring/osgi.xml [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/spring/oxm.xml [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/build.properties [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/pom.xml [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/src/main/java/org/argeo/slc/client/oxm/OxmBean.java [new file with mode: 0644]
eclipse/plugins/runtime/org.argeo.slc.client.oxm/src/main/java/org/argeo/slc/client/oxm/OxmInterface.java [new file with mode: 0644]

diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/.classpath b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/.classpath
new file mode 100644 (file)
index 0000000..54b896e
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+<classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/.project b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/.project
new file mode 100644 (file)
index 0000000..02b4cb4
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.slc.client.oxm</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/MANIFEST.MF b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..df483c6
--- /dev/null
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: Test Bundle to solve use case issues
+Bundle-SymbolicName: org.argeo.slc.client.oxm
+Export-Package: org.argeo.slc.client.oxm
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.ui
+Import-Package: org.argeo.slc,
+ org.springframework.core,
+ org.springframework.oxm,
+ org.springframework.xml.transform
+
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/spring/osgi.xml b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/spring/osgi.xml
new file mode 100644 (file)
index 0000000..cac01bb
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+       xsi:schemaLocation="http://www.springframework.org/schema/osgi  
+       http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
+       http://www.springframework.org/schema/beans   
+       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+       <beans:description>
+               This bundle is a dummy one to try to solve issues on
+               the OSGI dep management
+       </beans:description>
+
+       <!-- Services exposed by the bundle -->
+       <service ref="oxmBean" interface="org.argeo.slc.client.oxm.OxmInterface" />
+
+
+       <!-- References Needed -->
+       <reference id="marshaller" interface="org.springframework.oxm.Marshaller" />
+       <reference id="unmarshaller" interface="org.springframework.oxm.Unmarshaller" />
+
+</beans:beans>
\ No newline at end of file
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/spring/oxm.xml b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/META-INF/spring/oxm.xml
new file mode 100644 (file)
index 0000000..b1bc1f9
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+              http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+              ">
+       <!-- beans -->
+       <bean id="oxmBean" class="org.argeo.slc.client.oxm.OxmBean" scope="prototype"
+               init-method="init" lazy-init="false">
+               <property name="marshaller" ref="marshaller" />
+               <property name="unmarshaller" ref="unmarshaller" />
+       </bean>
+
+</beans>
\ No newline at end of file
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/build.properties b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/build.properties
new file mode 100644 (file)
index 0000000..5fc538b
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+output.. = target/classes/
+bin.includes = META-INF/,\
+               .
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/pom.xml b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/pom.xml
new file mode 100644 (file)
index 0000000..c92200e
--- /dev/null
@@ -0,0 +1,41 @@
+<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.eclipse</groupId>
+               <artifactId>plugins</artifactId>
+               <version>0.13.0-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.slc.client.oxm</artifactId>
+       <name>SLC Client OXM</name>
+       <packaging>jar</packaging>
+       
+       <dependencies>
+       <!-- SLC -->
+               <dependency>
+                       <groupId>org.argeo.slc.runtime</groupId>
+                       <artifactId>org.argeo.slc.core</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               <!-- Eclipse -->
+               <dependency>
+                       <groupId>org.eclipse.ui</groupId>
+                       <artifactId>org.eclipse.ui</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.eclipse.core</groupId>
+                       <artifactId>org.eclipse.core.runtime</artifactId>
+               </dependency>
+               <!-- Oxm -->
+               <dependency>
+                       <groupId>org.springframework.ws</groupId>
+                       <artifactId>org.springframework.oxm</artifactId>
+               </dependency>
+               <dependency>
+                               <groupId>org.springframework.ws</groupId>
+                               <artifactId>org.springframework.xml</artifactId>
+               </dependency>
+
+       </dependencies>
+</project>
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/src/main/java/org/argeo/slc/client/oxm/OxmBean.java b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/src/main/java/org/argeo/slc/client/oxm/OxmBean.java
new file mode 100644 (file)
index 0000000..5ea94d2
--- /dev/null
@@ -0,0 +1,48 @@
+package org.argeo.slc.client.oxm;
+
+import org.argeo.slc.SlcException;
+import org.springframework.oxm.Marshaller;
+import org.springframework.oxm.Unmarshaller;
+import org.springframework.xml.transform.StringResult;
+import org.springframework.xml.transform.StringSource;
+
+public class OxmBean implements OxmInterface {
+
+       private Marshaller marshaller;
+       private Unmarshaller unmarshaller;
+
+       public void init() {
+       }
+
+       public Object unmarshal(String result) {
+               Object res;
+               if (result == null)
+                       throw new SlcException("Cannot unmarshall empty string ");
+               try {
+                       res = unmarshaller.unmarshal(new StringSource(result));
+               } catch (Exception e) {
+                       throw new SlcException("Could not unmarshall " + result, e);
+               }
+               return res;
+       }
+
+       public String marshal(Object graph) {
+               StringResult result = new StringResult();
+               try {
+                       marshaller.marshal(graph, result);
+               } catch (Exception e) {
+                       throw new SlcException("Cannot Marshal object " + graph.toString()
+                                       + " - " + e);
+               }
+               return result.toString();
+       }
+
+       // IoC
+       public void setMarshaller(Marshaller marshaller) {
+               this.marshaller = marshaller;
+       }
+
+       public void setUnmarshaller(Unmarshaller unmarshaller) {
+               this.unmarshaller = unmarshaller;
+       }
+}
diff --git a/eclipse/plugins/runtime/org.argeo.slc.client.oxm/src/main/java/org/argeo/slc/client/oxm/OxmInterface.java b/eclipse/plugins/runtime/org.argeo.slc.client.oxm/src/main/java/org/argeo/slc/client/oxm/OxmInterface.java
new file mode 100644 (file)
index 0000000..dd43010
--- /dev/null
@@ -0,0 +1,9 @@
+package org.argeo.slc.client.oxm;
+
+public interface OxmInterface {
+
+       public String marshal(Object graph);
+
+       public Object unmarshal(String result);
+
+}