You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/05/03 22:31:13 UTC

svn commit: r399409 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.runtime.common/ org.apache.geronimo.runtime.common/META-INF/ org.apache.geronimo.st.core/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/

Author: sppatel
Date: Wed May  3 13:31:07 2006
New Revision: 399409

URL: http://svn.apache.org/viewcvs?rev=399409&view=rev
Log:
write out mappings in xml using xstream for debugging purproses

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ModuleArtifactMapper.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF?rev=399409&r1=399408&r2=399409&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/META-INF/MANIFEST.MF Wed May  3 13:31:07 2006
@@ -8,9 +8,27 @@
  lib/commons-logging-1.0.4.jar,
  lib/stax-api-1.0.jar,
  lib/mx4j-3.0.1.jar,
- lib/cglib-nodep-2.1_3.jar
+ lib/cglib-nodep-2.1_3.jar,
+ lib/xstream-1.1.3.jar
 Bundle-Localization: plugin 
-Export-Package: javax.enterprise.deploy.model,
+Export-Package: com.thoughtworks.xstream,
+ com.thoughtworks.xstream.alias,
+ com.thoughtworks.xstream.annotations,
+ com.thoughtworks.xstream.converters,
+ com.thoughtworks.xstream.converters.basic,
+ com.thoughtworks.xstream.converters.collections,
+ com.thoughtworks.xstream.converters.enums,
+ com.thoughtworks.xstream.converters.extended,
+ com.thoughtworks.xstream.converters.javabean,
+ com.thoughtworks.xstream.converters.reflection,
+ com.thoughtworks.xstream.core,
+ com.thoughtworks.xstream.core.util,
+ com.thoughtworks.xstream.io,
+ com.thoughtworks.xstream.io.path,
+ com.thoughtworks.xstream.io.xml,
+ com.thoughtworks.xstream.io.xml.xppdom,
+ com.thoughtworks.xstream.mapper,
+ javax.enterprise.deploy.model,
  javax.enterprise.deploy.model.exceptions,
  javax.enterprise.deploy.shared,
  javax.enterprise.deploy.shared.factories,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/pom.xml?rev=399409&r1=399408&r2=399409&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/pom.xml Wed May  3 13:31:07 2006
@@ -67,6 +67,11 @@
                                     <artifactId>mx4j</artifactId>
                                     <version>3.0.1</version>
                                 </artifactItem>
+                                <artifactItem>
+                                    <groupId>xstream</groupId>
+                                    <artifactId>xstream</artifactId>
+                                    <version>1.1.3</version>
+                                </artifactItem>
                             </artifactItems>
                             <outputDirectory>lib</outputDirectory>
                         </configuration>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml?rev=399409&r1=399408&r2=399409&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/pom.xml Wed May  3 13:31:07 2006
@@ -86,5 +86,7 @@
             <artifactId>org.apache.geronimo.runtime.common</artifactId>
             <version>${org.apache.geronimo.runtime.common_version}</version>
         </dependency>
+        <dependency>
+        </dependency>
     </dependencies>
 </project>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java?rev=399409&r1=399408&r2=399409&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java Wed May  3 13:31:07 2006
@@ -139,9 +139,7 @@
 			
 			TargetModuleID[] ids = ((DeploymentCmdStatus) status).getResultTargetModuleIDs();
 			ModuleArtifactMapper mapper = ModuleArtifactMapper.getInstance();
-			for(int i = 0; i < ids.length; i++) {
-				mapper.addEntry(getServer(), module.getProject(), ids[i].getModuleID());
-			}
+			mapper.addEntry(getServer(), module.getProject(), ids[0].getModuleID());
 
 			status = start(module);
 			if (!status.isOK()) {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ModuleArtifactMapper.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ModuleArtifactMapper.java?rev=399409&r1=399408&r2=399409&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ModuleArtifactMapper.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ModuleArtifactMapper.java Wed May  3 13:31:07 2006
@@ -35,6 +35,9 @@
 import org.eclipse.wst.server.core.IServer;
 import org.eclipse.wst.server.core.ServerCore;
 
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+
 public class ModuleArtifactMapper {
 
 	private static ModuleArtifactMapper instance = new ModuleArtifactMapper();
@@ -42,8 +45,11 @@
 	private static final String FILE_NAME = "servermodule.info";
 
 	HashMap serverEntries;
+	
+	XStream xStream;
 
 	private ModuleArtifactMapper() {
+		xStream = new XStream(new DomDriver());
 		load();
 		if (serverEntries == null)
 			serverEntries = new HashMap();
@@ -84,7 +90,8 @@
 			OutputStream file = new FileOutputStream(dest.toFile());
 			OutputStream buffer = new BufferedOutputStream(file);
 			output = new ObjectOutputStream(buffer);
-			output.writeObject(serverEntries);
+			String xml = xStream.toXML(serverEntries);
+			output.writeObject(xml);
 		} catch (IOException e) {
 			e.printStackTrace();
 		} finally {
@@ -105,7 +112,8 @@
 				InputStream file = new FileInputStream(dest.toFile());
 				InputStream buffer = new BufferedInputStream(file);
 				input = new ObjectInputStream(buffer);
-				serverEntries = (HashMap) input.readObject();
+				String xml = (String) input.readObject();
+				serverEntries = (HashMap)xStream.fromXML(xml);
 			}
 		} catch (Exception e) {
 			e.printStackTrace();