geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1070803 - in /geronimo/server/branches/3.0-M2: framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/
Date Tue, 15 Feb 2011 08:16:37 GMT
Author: rwonly
Date: Tue Feb 15 08:16:37 2011
New Revision: 1070803

URL: http://svn.apache.org/viewvc?rev=1070803&view=rev
Log:
GERONIMO-5765 Display a warning message when a WAB is deployed in admin console

Modified:
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java

Modified: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=1070803&r1=1070802&r2=1070803&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/server/branches/3.0-M2/framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
Tue Feb 15 08:16:37 2011
@@ -111,6 +111,20 @@ public class Deployer implements GBeanLi
         File originalModuleFile = moduleFile;
         File tmpDir = null;
         if (moduleFile != null && !moduleFile.isDirectory()) {
+            
+            // GERONIMO-5765 add a warning message if user is deploying a wab
+            // In future, we will support bundle deployment through deployer and remove this,
see GERONIMO-5764
+            try {
+                JarFile moduleJar = new JarFile(moduleFile);
+                Manifest mf = moduleJar.getManifest();
+                if (mf!=null && mf.getMainAttributes().getValue("Web-ContextPath")!=
null){
+                    log.warn("You are deploying a WAB to Geronimo. The recommended way to
install a bundle is using a standard OSGi installation.");
+                } 
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+            
+            
             // todo jar url handling with Sun's VM on Windows leaves a lock on the module
file preventing rebuilds
             // to address this we use a gross hack and copy the file to a temporary directory
             // the lock on the file will prevent that being deleted properly until the URLJarFile
has

Modified: geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java?rev=1070803&r1=1070802&r2=1070803&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
(original)
+++ geronimo/server/branches/3.0-M2/plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/configmanager/DeploymentPortlet.java
Tue Feb 15 08:16:37 2011
@@ -121,6 +121,15 @@ public class DeploymentPortlet extends B
         } catch (FileUploadException e) {
             throw new PortletException(e);
         }
+        
+        // GERONIMO-5765 add a warning message if user is deploying a wab
+        // In future, we will support bundle deployment through deployer and remove this,
see GERONIMO-5764
+        String moduleFileName = moduleFile.getName();
+        if (moduleFileName.substring(moduleFileName.lastIndexOf('.')).toLowerCase().equals(".wab")){
+            String wabmsg = "You are deploying a WAB to Geronimo. The recommended way to
install a bundle is using a standard OSGi installation.";
+            addInfoMessage(actionRequest, "[INFO] "+wabmsg);
+        }
+        
         DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
         FileInputStream fis = null;
         try {



Mime
View raw message