geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r416382 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServerBehaviour.java
Date Thu, 22 Jun 2006 14:36:01 GMT
Author: sppatel
Date: Thu Jun 22 07:36:01 2006
New Revision: 416382

URL: http://svn.apache.org/viewvc?rev=416382&view=rev
Log:
need to append module extension to publishdir path

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServerBehaviour.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServerBehaviour.java?rev=416382&r1=416381&r2=416382&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServerBehaviour.java
Thu Jun 22 07:36:01 2006
@@ -41,6 +41,7 @@
 import org.apache.geronimo.kernel.jmx.KernelDelegate;
 import org.apache.geronimo.st.core.GenericGeronimoServerBehaviour;
 import org.apache.geronimo.st.core.GeronimoConnectionFactory;
+import org.apache.geronimo.st.core.GeronimoUtils;
 import org.apache.geronimo.st.v1.core.internal.Trace;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
@@ -179,14 +180,27 @@
 			return null;
 		
 		try {
-			String configId = getConfigId(module[0]);
+			IModule workingModule = module[0];
+			String configId = getConfigId(workingModule);
 			ObjectName on = Configuration.getConfigurationObjectName(URI.create(configId));
 			GBeanData data = kernel.getGBeanData(on);
 			URL url = (URL) data.getAttribute("baseURL");
 			IPath modulePath = new Path(url.getFile());
 			if(module.length == 2) {
-				modulePath = modulePath.append(module[1].getName());
+				workingModule = module[1];
+				modulePath = modulePath.append(workingModule.getName());
 			} 
+			
+			if(GeronimoUtils.isWebModule(workingModule)) {
+				modulePath = modulePath.addFileExtension(".war");
+			} else if(GeronimoUtils.isEjbJarModule(workingModule)) {
+				modulePath = modulePath.addFileExtension(".jar");
+			} else if(GeronimoUtils.isRARModule(workingModule)) {
+				modulePath = modulePath.addFileExtension(".rar");
+			} else if(GeronimoUtils.isEarModule(workingModule)) {
+				modulePath = modulePath.addFileExtension(".ear");
+			}
+			
 		} catch (MalformedObjectNameException e) {
 			e.printStackTrace();
 		} catch (GBeanNotFoundException e) {



Mime
View raw message