geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnx...@apache.org
Subject svn commit: r1295382 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core: GeronimoServerBehaviourDelegate.java IGeronimoServerBehavior.java
Date Thu, 01 Mar 2012 02:16:00 GMT
Author: johnxiao
Date: Thu Mar  1 02:16:00 2012
New Revision: 1295382

URL: http://svn.apache.org/viewvc?rev=1295382&view=rev
Log:
GERONIMODEVTOOLS-788 The hot deploy of jsp and other static resource files do not work even
under the development mode

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServerBehavior.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=1295382&r1=1295381&r2=1295382&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
Thu Mar  1 02:16:00 2012
@@ -1083,6 +1083,10 @@ public class GeronimoServerBehaviourDele
             target.append(moduleFile.getName());
             
             File file = new File(target.toString());
+            if(! file.isAbsolute()) {
+                file = getServerResource(IGeronimoServerBehavior.VAR_CATALINA_DIR + target.toString()).toFile();
+            }
+            
             switch (deltaModule.getKind()) {
             case IModuleResourceDelta.REMOVED:
                 if (file.exists()) {
@@ -1364,6 +1368,13 @@ public class GeronimoServerBehaviourDele
         return false;
     }
     
+    
+    @Override
+    public IPath getServerResource(String path) {
+        IPath serverRoot = getServer().getRuntime().getLocation();
+        return serverRoot.append(path);
+    }
+
     public void startUpdateServerStateTask() {
         Trace.tracePoint("Entry", Activator.traceCore, "GeronimoServerBehaviourDelegate.startUpdateServerStateTask",
getServer().getName());
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServerBehavior.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/IGeronimoServerBehavior.java?rev=1295382&r1=1295381&r2=1295382&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServerBehavior.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServerBehavior.java
Thu Mar  1 02:16:00 2012
@@ -16,12 +16,17 @@
  */
 package org.apache.geronimo.st.v30.core;
 
+import java.io.File;
+
 import javax.enterprise.deploy.spi.Target;
 
+import org.eclipse.core.runtime.IPath;
+
 /**
  * @version $Rev$ $Date$
  */
 public interface IGeronimoServerBehavior {
+    public static String VAR_CATALINA_DIR = "var" + File.separator + "catalina" + File.separator;
 
     public boolean isFullyStarted();
 
@@ -32,5 +37,13 @@ public interface IGeronimoServerBehavior
     public void setServerStopped();
     
     public Target[] getTargets();
+    
+    /**
+     * Return the Resource under server installation directory
+     * 
+     * @param path the relative file path under the server installation directory
+     * @return
+     */
+    public IPath getServerResource(String path);
 
 }



Mime
View raw message