geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1332784 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Date Tue, 01 May 2012 19:12:21 GMT
Author: gawor
Date: Tue May  1 19:12:21 2012
New Revision: 1332784

URL: http://svn.apache.org/viewvc?rev=1332784&view=rev
Log:
Document base is non null now so make sure we have the right publish location

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java?rev=1332784&r1=1332783&r2=1332784&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Tue May  1 19:12:21 2012
@@ -1037,8 +1037,23 @@ public class GeronimoServerBehaviourDele
         }
 
         String documentBase = getWebModuleDocumentBase(contextPath);
-        Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.getWebModuleDocumentBase",
contextPath, documentBase);
-        return documentBase;        
+        if (documentBase == null) {
+            Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.getWebModuleDocumentBase",
"Document base is not set");
+            return null;
+        }
+        
+        File publishLocation = new File(documentBase);
+        if (!publishLocation.isAbsolute()) {
+            publishLocation = getServerResource(IGeronimoServerBehavior.VAR_CATALINA_DIR
+ documentBase).toFile();            
+        }
+        
+        if (!publishLocation.exists()) {
+            Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.getWebModuleDocumentBase",
"Document base does not exist", publishLocation);
+            return null;
+        }
+        
+        Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.getWebModuleDocumentBase",
contextPath, documentBase, publishLocation);
+        return publishLocation.getAbsolutePath();
     }
     
     private IStatus tryFileReplace(IModule[] module) {
@@ -1046,8 +1061,8 @@ public class GeronimoServerBehaviourDele
         
         IModule webModule = module[module.length - 1];        
         String documentBase = getWebModuleDocumentBase(webModule);
-        if (documentBase == null ) {
-            Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.tryFileReplace",
"Document base is null");
+        if (documentBase == null) {
+            Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.tryFileReplace",
"Document base is not set or is invalid");
             return null;
         }
 



Mime
View raw message