geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r817996 [16/23] - in /geronimo/devtools/eclipse-plugin/trunk: assembly/ assembly/src/main/assembly/ features/ features/org.apache.geronimo.v22.feature/ plugins/ plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/ plugins/org.apache.geronimo.j2e...
Date Wed, 23 Sep 2009 08:04:34 GMT
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/JAXBUtils.java Wed Sep 23 08:04:12 2009
@@ -100,7 +100,7 @@
         return null;
     }
     
-    public static void marshalDeploymentPlan(JAXBElement jaxbElement, IFile file) {
+    public static void marshalDeploymentPlan(JAXBElement jaxbElement, IFile file) throws Exception {
         try {
             Marshaller marshaller = jaxbContext.createMarshaller();
             marshaller.setListener(marshallerListener);
@@ -138,26 +138,26 @@
             }
         } catch (JAXBException jaxbException) {
             Trace.tracePoint("JAXBException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
-            jaxbException.printStackTrace();
+            throw jaxbException;
         } catch (CoreException coreException) {
             Trace.tracePoint("CoreException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
-            coreException.printStackTrace();
+            throw coreException;
         } catch (ParserConfigurationException e) {
         	Trace.tracePoint("ParserConfigurationException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
-			e.printStackTrace();
+        	throw e;
 		} catch (TransformerConfigurationException e) {
 			Trace.tracePoint("TransformerConfigurationException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
-			e.printStackTrace();
+			throw e;
 		} catch (UnsupportedEncodingException e) {
 			Trace.tracePoint("UnsupportedEncodingException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
-			e.printStackTrace();
+			throw e;
 		} catch (TransformerException e) {
 			Trace.tracePoint("TransformerException", "JAXBUtils.marshalDeploymentPlan()", file.getFullPath());
-			e.printStackTrace();
+			throw e;
 		}
     }
 
-    public static JAXBElement unmarshalFilterDeploymentPlan(IFile file) {
+    public static JAXBElement unmarshalFilterDeploymentPlan(IFile file) throws Exception {
         try {
             Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
             SAXParserFactory factory = SAXParserFactory.newInstance();
@@ -170,21 +170,20 @@
             return plan;
         } catch (JAXBException e) {
             Trace.tracePoint("JAXBException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
-            e.printStackTrace();
+            throw e;
         } catch (CoreException e) {
             Trace.tracePoint("CoreException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
-            e.printStackTrace();
+            throw e;
         } catch (ParserConfigurationException e) {
             Trace.tracePoint("ParserConfigurationException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
-            e.printStackTrace();
+            throw e;
         } catch (SAXException e) {
             Trace.tracePoint("SAXException", "JAXBUtils.unmarshalFilterDeploymentPlan()", file.getFullPath());
-            e.printStackTrace();
+            throw e;
         }
-        return null;
     }
 
-    public static void marshalPlugin(JAXBElement jaxbElement, OutputStream outputStream) {
+    public static void marshalPlugin(JAXBElement jaxbElement, OutputStream outputStream) throws Exception {
         try {
             Marshaller marshaller = jaxbPluginContext.createMarshaller();
             marshaller.setListener(marshallerListener);
@@ -215,19 +214,19 @@
             outputStream.write(outBuffer.toByteArray());
         } catch (JAXBException jaxbException) {
             Trace.tracePoint("JAXBException", "JAXBUtils.marshalDeploymentPlan()");
-            jaxbException.printStackTrace();
+            throw jaxbException;
         } catch (IOException coreException) {
             Trace.tracePoint("IOException", "JAXBUtils.marshalDeploymentPlan()");
-            coreException.printStackTrace();
+            throw coreException;
         } catch (ParserConfigurationException e) {
             Trace.tracePoint("ParserConfigurationException", "JAXBUtils.marshalDeploymentPlan()");
-            e.printStackTrace();
+            throw e;
         } catch (TransformerConfigurationException e) {
             Trace.tracePoint("TransformerConfigurationException", "JAXBUtils.marshalDeploymentPlan()");
-            e.printStackTrace();
+            throw e;
         } catch (TransformerException e) {
             Trace.tracePoint("TransformerException", "JAXBUtils.marshalDeploymentPlan()");
-            e.printStackTrace();
+            throw e;
         }
     }
 
@@ -264,28 +263,18 @@
         ((IFolder) folder).create(true, true, null);
     }
 
-    public static Object getValue( Object element, String name ) {
+    public static Object getValue( Object element, String name ) throws Exception {
         try {
             if (String.class.isInstance(element))
                 return (String)element;
             Method method = element.getClass().getMethod( "get" + name, null);
             return method.invoke(element, null);
-        } catch ( NoSuchMethodException e ) {
-            e.printStackTrace();
-        } catch (IllegalArgumentException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        } catch (IllegalAccessException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        } catch (InvocationTargetException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+        } catch ( Exception e ) {
+            throw e;
         }
-        return null;
     }
     
-    public static void setValue( Object element, String name, Object value ) {
+    public static void setValue( Object element, String name, Object value ) throws Exception {
         try {
             Method[] methods = element.getClass().getMethods();
             for ( Method method: methods) {
@@ -294,15 +283,8 @@
                     return;
                 }
             }
-        } catch (IllegalArgumentException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        } catch (IllegalAccessException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-        } catch (InvocationTargetException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
+        } catch (Exception e) {
+            throw e;
         }
         System.out.println( "============== No such method set" + name + " in class " + element.getClass().getName() );
     }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java Wed Sep 23 08:04:12 2009
@@ -18,6 +18,7 @@
 
 import javax.xml.bind.JAXBElement;
 
+import org.apache.geronimo.st.core.Activator;
 import org.apache.geronimo.st.core.GeronimoUtils;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.resources.IFile;
@@ -54,11 +55,15 @@
 	 */
 	public IStatus execute(IProgressMonitor monitor, IAdaptable info)
 			throws ExecutionException {
-		execute();
+		try {
+			execute();
+		}catch (Exception e){
+			return new Status(IStatus.ERROR,Activator.PLUGIN_ID,"Error in creating deployment plan",e);
+		}
 		return Status.OK_STATUS;
 	}
 
-	public void execute() {
+	public void execute() throws Exception {
 		IVirtualComponent comp = ComponentCore.createComponent(getProject());
 
 		String type = J2EEProjectUtilities.getJ2EEProjectType(getProject());
@@ -73,27 +78,34 @@
 			createGeronimoApplicationClientDeploymentPlan(GeronimoUtils.getApplicationClientDeploymentPlanFile(comp));
 		} else if (IModuleConstants.JST_CONNECTOR_MODULE.equals(type)) {
 			createConnectorDeploymentPlan(GeronimoUtils.getConnectorDeploymentPlanFile(comp));
+		} else if (IModuleConstants.JST_UTILITY_MODULE.equals(type)) {
+			createServiceDeploymentPlan(GeronimoUtils.getServiceDeploymentPlanFile(comp));
 		}
 	}
 
 	
-	public JAXBElement createOpenEjbDeploymentPlan(IFile file) {
+	public JAXBElement createOpenEjbDeploymentPlan(IFile file) throws Exception {
 		return null;
 	}
 
-	public JAXBElement createGeronimoWebDeploymentPlan(IFile file) {
+	public JAXBElement createGeronimoWebDeploymentPlan(IFile file) throws Exception {
 		return null;
 	}
 
-	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile file) {
+	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile file) throws Exception {
 		return null;
 	}
 
-	public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile file) {
+	public JAXBElement createGeronimoApplicationClientDeploymentPlan(IFile file) throws Exception{
 		return null;
 	}
 
-	public JAXBElement createConnectorDeploymentPlan(IFile file) {
+	public JAXBElement createConnectorDeploymentPlan(IFile file) throws Exception{
+		return null;
+	}
+	
+
+	public JAXBElement createServiceDeploymentPlan(IFile file) throws Exception{
 		return null;
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java Wed Sep 23 08:04:12 2009
@@ -25,12 +25,12 @@
  */
 public interface IDeploymentPlanCreationOp {
 
-	public JAXBElement createOpenEjbDeploymentPlan(IFile file);
+	public JAXBElement createOpenEjbDeploymentPlan(IFile file) throws Exception;
 
-	public JAXBElement createGeronimoWebDeploymentPlan(IFile file);
+	public JAXBElement createGeronimoWebDeploymentPlan(IFile file) throws Exception;
 
-	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile file);
+	public JAXBElement createGeronimoApplicationDeploymentPlan(IFile file) throws Exception;
 
-	public JAXBElement createConnectorDeploymentPlan(IFile file);
+	public JAXBElement createConnectorDeploymentPlan(IFile file) throws Exception;
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java Wed Sep 23 08:04:12 2009
@@ -50,6 +50,7 @@
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -156,7 +157,11 @@
 			
 			updateAndRecycleSharedLib(addList, deleteList);
 			
-		} catch (Exception e) {
+		}catch (CoreException e){
+			IStatus status = e.getStatus();
+			Trace.trace(Trace.SEVERE, status.getMessage(), e);
+			throw new ExecutionException(status.getMessage(), e);
+		}catch (Exception e) {
 			Trace.trace(Trace.SEVERE, "Failure in updating shared library.", e);
 			throw new ExecutionException("Failure in updating shared library", e);
 		} finally {
@@ -250,11 +255,12 @@
 		return entries;
 	}
 
-	private void delete(File dummyJarFile) {
+	private void delete(File dummyJarFile) throws CoreException {
 		if(dummyJarFile.delete()) {
 			Trace.trace(Trace.INFO, dummyJarFile.getAbsolutePath() + " deleted sucessfully.");
 		} else {
 			Trace.trace(Trace.SEVERE, "Failed to delete " + dummyJarFile.getAbsolutePath(), null);
+			throw new CoreException(new Status(IStatus.ERROR,Activator.PLUGIN_ID,"Failed to delete " + dummyJarFile.getAbsolutePath(),null));
 		}
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/META-INF/MANIFEST.MF Wed Sep 23 08:04:12 2009
@@ -16,6 +16,7 @@
  org.eclipse.ui.views,
  org.eclipse.wst.server.ui,
  org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.xml.ui,
  org.eclipse.debug.ui,
  org.eclipse.jdt.debug.ui,
  org.eclipse.wst.common.modulecore,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/plugin.xml Wed Sep 23 08:04:12 2009
@@ -49,13 +49,15 @@
 
         <image id="org.apache.geronimo.runtime.image" 
             icon="icons/obj16/littleG.gif"
-            typeIds="org.apache.geronimo.runtime.20,
+            typeIds="org.apache.geronimo.runtime.11,
+            		 org.apache.geronimo.runtime.20,
                      org.apache.geronimo.runtime.21,
                      org.apache.geronimo.runtime.22"/>
 
         <image id="org.apache.geronimo.server.image" 
             icon="icons/obj16/littleG.gif"
-            typeIds="org.apache.geronimo.server.20,
+            typeIds="org.apache.geronimo.server.11,
+            		 org.apache.geronimo.server.20,
                      org.apache.geronimo.server.21,
                      org.apache.geronimo.server.22"/>
     </extension>
@@ -71,12 +73,14 @@
      -->
     <extension point="org.eclipse.wst.server.ui.wizardFragments">
         <fragment id="org.apache.geronimo.runtime.wizardFragment"
-            typeIds="org.apache.geronimo.runtime.20,
+            typeIds="org.apache.geronimo.runtime.11,
+            		 org.apache.geronimo.runtime.20,
                      org.apache.geronimo.runtime.21,
                      org.apache.geronimo.runtime.22"
             class="org.apache.geronimo.st.ui.internal.GeronimoRuntimeWizardFragment"/>
         <fragment id="org.apache.geronimo.server.wizardFragment"
-            typeIds="org.apache.geronimo.server.20,
+            typeIds="org.apache.geronimo.server.11,
+            		 org.apache.geronimo.server.20,
                      org.apache.geronimo.server.21,
                      org.apache.geronimo.server.22"
             class="org.apache.geronimo.st.ui.internal.GeronimoServerWizardFragment"/>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/Activator.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/Activator.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/Activator.java Wed Sep 23 08:04:12 2009
@@ -23,6 +23,7 @@
 
 import org.apache.geronimo.st.ui.internal.Trace;
 import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.swt.graphics.Image;
@@ -63,7 +64,8 @@
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
 	 */
 	public void start(BundleContext context) throws Exception {
-		super.start(context);
+		super.start(context);	
+		this.setDebugging(true);
 		this.setDebugging(true);
 	}
 
@@ -140,7 +142,7 @@
 
 		URL iconsURL = plugin.getBundle().getEntry(ICONS_DIRECTORY);
 
-		try {
+		try { 
 			ImageDescriptor id = ImageDescriptor.createFromURL(new URL(iconsURL, partialURL));
 			registry.put(key, id);
 			imageDescriptors.put(key, id);
@@ -149,4 +151,8 @@
 		}
 	}
 
+	public static void log(int statusLevel, String s, Throwable t) {
+		plugin.getLog().log(new Status(statusLevel, PLUGIN_ID, 0, s, t));
+	}
+
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoDeploymentPlanEditor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoDeploymentPlanEditor.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoDeploymentPlanEditor.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoDeploymentPlanEditor.java Wed Sep 23 08:04:12 2009
@@ -95,12 +95,14 @@
             }
         } catch (Exception e) {
             Trace.trace(Trace.SEVERE, "Error saving", e);
+            MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error saving", e.getMessage());
         } finally {
             try {
                 if (is != null)
                     is.close();
             } catch (Exception e) {
-                // do nothing
+            	Trace.trace(Trace.SEVERE, "Error saving", e);
+            	MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error saving", e.getMessage());
             }
         }
     }
@@ -184,7 +186,11 @@
         super.init(site, input);
         if (input instanceof IFileEditorInput) {
             IFileEditorInput fei = (IFileEditorInput) input;
-            deploymentPlan = loadDeploymentPlan(fei.getFile());
+            try {
+				deploymentPlan = loadDeploymentPlan(fei.getFile());
+			} catch (Exception e1) {
+				throw new PartInitException("Error in loading deployment plan");
+			}
             
             boolean fix = false;
             if(deploymentPlan == null) {
@@ -201,10 +207,14 @@
                     IDataModelOperation op = new ImportDeploymentPlanOperation(model);
                     op.execute(new NullProgressMonitor(), null);
                 } catch (Exception e) {
-                    //ingnore
+                   throw new PartInitException(e.getMessage());
                 }
                 
-                deploymentPlan = loadDeploymentPlan(fei.getFile());
+                try {
+					deploymentPlan = loadDeploymentPlan(fei.getFile());
+				} catch (Exception e) {
+					throw new PartInitException("Error in loading deployment plan");
+				}
                 
                 if (deploymentPlan == null) {    
                     MessageDialog.openInformation(Display.getDefault().getActiveShell(), Messages.errorOpenDialog, Messages.editorDefault);
@@ -213,7 +223,7 @@
         }
     }
 
-    public void reloadDeploymentPlan() {
+    public void reloadDeploymentPlan() throws Exception {
         IEditorInput input = getEditorInput();
         if (input instanceof IFileEditorInput) {
             IFileEditorInput fei = (IFileEditorInput) input;
@@ -253,7 +263,7 @@
         super.pageChange(newPageIndex);
     }
 
-    abstract public JAXBElement loadDeploymentPlan(IFile file);
-    abstract public void saveDeploymentPlan(IFile file) throws IOException, JAXBException;
+    abstract public JAXBElement loadDeploymentPlan(IFile file) throws Exception;
+    abstract public void saveDeploymentPlan(IFile file) throws Exception;
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoFormContentLoader.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoFormContentLoader.java Wed Sep 23 08:04:12 2009
@@ -68,7 +68,7 @@
 
 	abstract public void addApplicationClientPlanPages(FormEditor editor) throws PartInitException;
 
-	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws IOException, JAXBException {
+	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws Exception {
 		JAXBUtils.marshalDeploymentPlan(deploymentPlan, file);
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/IGeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/IGeronimoFormContentLoader.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/IGeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/IGeronimoFormContentLoader.java Wed Sep 23 08:04:12 2009
@@ -30,8 +30,8 @@
  */
 public interface IGeronimoFormContentLoader {
 	
-	public JAXBElement loadDeploymentPlan(IFile file);
-	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws IOException, JAXBException;
+	public JAXBElement loadDeploymentPlan(IFile file) throws Exception;
+	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws Exception;
 	
 	public void doAddPages(FormEditor editor) throws PartInitException;
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/SharedDeploymentPlanEditor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/SharedDeploymentPlanEditor.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/SharedDeploymentPlanEditor.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/SharedDeploymentPlanEditor.java Wed Sep 23 08:04:12 2009
@@ -95,14 +95,14 @@
 	 * 
 	 * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor#loadDeploymentPlan(org.eclipse.core.resources.IFile)
 	 */
-	public JAXBElement loadDeploymentPlan(IFile file) {
+	public JAXBElement loadDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "SharedDeploymentPlanEditor.loadDeploymentPlan", file);
         JAXBElement jaxbElement = getLoader() != null ? currentLoader.loadDeploymentPlan(file) : null;
         Trace.tracePoint("EXIT", "SharedDeploymentPlanEditor.loadDeploymentPlan", jaxbElement);
 		return jaxbElement;
 	}
 	
-	public void saveDeploymentPlan(IFile file) throws IOException, JAXBException {
+	public void saveDeploymentPlan(IFile file) throws Exception {
 		if (getLoader() != null) {
 			getLoader().saveDeploymentPlan(deploymentPlan, file);
 		}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Trace.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Trace.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Trace.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/Trace.java Wed Sep 23 08:04:12 2009
@@ -17,6 +17,7 @@
 package org.apache.geronimo.st.ui.internal;
 
 import org.apache.geronimo.st.ui.Activator;
+import org.eclipse.core.runtime.IStatus;
 
 
 /**
@@ -77,6 +78,7 @@
         System.out.println(Activator.PLUGIN_ID + ":  " + s);
         if (t != null)
             t.printStackTrace();
+        
     }
 
     /**

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/DeploymentPlanSourcePage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/DeploymentPlanSourcePage.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/DeploymentPlanSourcePage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/DeploymentPlanSourcePage.java Wed Sep 23 08:04:12 2009
@@ -18,6 +18,8 @@
 
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.wst.sse.ui.StructuredTextEditor;
 
 /**
@@ -35,6 +37,10 @@
     @Override
     public void doSave(IProgressMonitor progressMonitor) {
         super.doSave(progressMonitor);
-        editor.reloadDeploymentPlan();
+        try {
+			editor.reloadDeploymentPlan();
+		} catch (Exception e) {
+			MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+		}
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java Wed Sep 23 08:04:12 2009
@@ -21,8 +21,10 @@
 import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
 import org.apache.geronimo.st.core.jaxb.JAXBUtils;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Text;
 
 /**
@@ -63,7 +65,11 @@
                 createLabel(composite, section.getTableColumnNames()[i]);
                 String initialValue = "";
                 if (eObject != null) {
-                    initialValue = (String) JAXBUtils.getValue(eObject, getTableColumnEAttributes()[i]);
+                    try {
+						initialValue = (String) JAXBUtils.getValue(eObject, getTableColumnEAttributes()[i]);
+					} catch (Exception e) {
+						MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+					}
                 }
                 textEntries[i] = createTextField(composite, initialValue);
             }
@@ -102,7 +108,11 @@
             for (int i = 0; i < getTableColumnEAttributes().length; i++) {
                 String value = ((AbstractTableWizardPage) page).textEntries[i].getText();
                 String attribute = getTableColumnEAttributes()[i];
-                JAXBUtils.setValue(eObject, attribute, value);
+                try {
+					JAXBUtils.setValue(eObject, attribute, value);
+				} catch (Exception e) {
+					MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+				}
             }
         }
     }

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.classpath
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.classpath?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.classpath (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.classpath Wed Sep 23 08:04:12 2009
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.options
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.options?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.options (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.options Wed Sep 23 08:04:12 2009
@@ -0,0 +1 @@
+org.apache.geronimo.st.v11.core/debug=true
\ No newline at end of file

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.project
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.project?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.project (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/.project Wed Sep 23 08:04:12 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.geronimo.st.v11.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/G-logo-32x32.gif
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/G-logo-32x32.gif?rev=817996&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/G-logo-32x32.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF Wed Sep 23 08:04:12 2009
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Geronimo v11 Server Tools Core Plug-in
+Bundle-SymbolicName: org.apache.geronimo.st.v11.core;singleton:=true
+Bundle-Version: 2.2.0
+Bundle-Activator: org.apache.geronimo.st.v11.core.Activator
+Bundle-Vendor: Apache.org
+Bundle-Localization: plugin
+Require-Bundle: org.apache.geronimo.runtime.v11,
+ org.apache.geronimo.st.v21.core;bundle-version="2.2.0",
+ org.apache.geronimo.st.core,
+ org.apache.geronimo.j2ee.v11.jaxbmodel;bundle-version="2.2.0",
+ org.eclipse.core.runtime,
+ org.eclipse.wst.server.core,
+ org.eclipse.debug.core,
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.jst.common.frameworks,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.jst.j2ee
+Bundle-ActivationPolicy: lazy
+Export-Package: org.apache.geronimo.st.v11.core,
+ org.apache.geronimo.st.v11.core.internal,
+ org.apache.geronimo.st.v11.core.jaxb,
+ org.apache.geronimo.st.v11.core.operations
+

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/about.ini
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/about.ini?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/about.ini (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/about.ini Wed Sep 23 08:04:12 2009
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Rev: 583586 $ $Date: 2007-10-10 15:29:32 -0400 (Wed, 10 Oct 2007) $
+#
+
+#
+# Property "aboutText" contains blurb for feature details in the "About" 
+# dialog.  Maximum 15 lines and 75 characters per line.
+#
+aboutText=Apache Geronimo v1.1 Server Adapter\n\
+Version: ${pom.version}-${buildNumber}\n\
+\n\
+(c) Copyright 2003-2009 The Apache Software Foundation\n\
+Visit http://www.apache.org/licenses/LICENSE-2.0.txt for additional details\n\
+\n\
+Visit http://geronimo.apache.org/\n\
+\n\
+This product includes software developed by the\n\
+Apache Software Foundation http://www.apache.org/
+
+#
+# Property "featureImage" contains path to feature image (32x32)
+#
+featureImage=G-logo-32x32.gif

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/build.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/build.properties?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/build.properties (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/build.properties Wed Sep 23 08:04:12 2009
@@ -0,0 +1,10 @@
+source.. = src/
+bin.includes = .options,\
+               about.ini,\
+               G-logo-32x32.gif,\
+               META-INF/,\
+               plugin.properties,\
+               plugin.xml,\
+               pom.xml,\
+               .,\
+               target/

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.properties?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.properties (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.properties Wed Sep 23 08:04:12 2009
@@ -0,0 +1,35 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Rev: 471551 $ $Date: 2006-11-05 17:47:11 -0500 (Sun, 05 Nov 2006) $
+#
+pluginName=Geronimo Server Tools V11 Core Plug-in
+providerName=Apache Software Foundation
+
+runtimeTypeName=Apache Geronimo v1.1
+runtimeTypeDescription=Apache Geronimo v1.1 supports J2EE 1.2, 1.3 and 1.4.
+runtimeTypeVendor=Apache
+
+serverTypeName=Apache Geronimo v1.1 Server
+serverTypeDescription=Apache Geronimo v1.1 Server
+
+serverRootDirectory=Application Server Directory:
+port=Port:
+rmiport=RMI Naming Port:
+ejbport=EJB Port:
+adminId=Ad&ministrator Id:
+adminPassword=Administrator Password:
+classPath=Classpath Variable:
\ No newline at end of file

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml Wed Sep 23 08:04:12 2009
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!-- $Rev: 522975 $ $Date: 2007-03-27 12:04:11 -0400 (Tue, 27 Mar 2007) $ -->
+
+<plugin>
+	 <extension point="org.eclipse.wst.server.core.runtimeTypes">
+        <runtimeType id="org.apache.geronimo.runtime.11"
+            name="%runtimeTypeName" description="%runtimeTypeDescription"
+            vendor="%runtimeTypeVendor" version="1.1"
+            class="org.apache.geronimo.st.v11.core.GeronimoRuntime">
+            <moduleType types="jst.web" versions="2.2, 2.3, 2.4"/>
+            <moduleType types="jst.ejb" versions="1.1, 2.0, 2.1"/>
+            <moduleType types="jst.connector" versions="1.0, 1.5"/>
+            <moduleType types="jst.ear" versions="1.2, 1.3, 1.4"/>
+            <moduleType types="jst.utility" versions="1.0"/>
+        </runtimeType>
+    </extension>
+    
+    <extension point="org.eclipse.wst.server.core.serverTypes">
+        <serverType id="org.apache.geronimo.server.11"
+            name="%serverTypeName" description="%serverTypeDescription"
+            runtime="true"
+            class="org.apache.geronimo.st.v11.core.GeronimoServer"
+            initialState="stopped" supportsRemoteHosts="true"
+            startTimeout="240000" stopTimeout="30000" startBeforePublish="true"
+            runtimeTypeId="org.apache.geronimo.runtime.11"
+            launchConfigId="org.apache.geronimo.st.core.launchConfigurationType"
+            behaviourClass="org.apache.geronimo.st.v11.core.GeronimoServerBehaviour"
+            hasConfiguration="false" launchModes="run,debug,profile">
+        </serverType>
+    </extension>
+    
+    <!-- extension point="org.eclipse.wst.server.core.installableRuntimes">
+        <installableRuntime id="org.apache.geronimo.runtime.tomcat.11"
+            featureVersion="1.1.1"
+            featureId="org.apache.geronimo.installableruntime.tomcat.feature"
+            featureSite="http://www.apache.org/dist/geronimo/eclipse/updates/"
+            path="geronimo-tomcat-j2ee-1.1.1.zip">
+        </installableRuntime>
+        <installableRuntime id="org.apache.geronimo.runtime.jetty.11"
+            featureVersion="1.1.1"
+            featureId="org.apache.geronimo.installableruntime.jetty.feature"
+            featureSite="http://www.apache.org/dist/geronimo/eclipse/updates/"
+            path="geronimo-jetty-j2ee-1.1.1.zip">
+        </installableRuntime>
+    </extension -->
+    
+    <extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
+        <runtimeFacetMapping
+            runtimeTypeId="org.apache.geronimo.runtime.11"
+            runtime-component="org.apache.geronimo.runtime" version="1.1"/>
+    </extension>
+    
+    <extension point="org.eclipse.wst.common.project.facet.core.facets">        
+        <project-facet-version facet="org.apache.geronimo.facet" version="1.1">
+            <action type="install" id="geronimo.plan.install.v11">
+                <delegate class="org.apache.geronimo.st.v11.core.operations.GeronimoV11FacetInstallDelegate"/>
+                <config-factory class="org.apache.geronimo.st.v21.core.DeploymentPlanInstallConfig$Factory"/>
+            </action>
+            <constraint>
+                <or>
+                    <requires facet="jst.ear" version="1.2"/>
+                    <requires facet="jst.ear" version="1.3"/>
+                    <requires facet="jst.ear" version="1.4"/>
+                    <requires facet="jst.ear" version="1.4"/>
+                    <requires facet="jst.ear" version="5.0"/>
+                    <requires facet="jst.appclient" version="1.2"/>
+                    <requires facet="jst.appclient" version="1.3"/>
+                    <requires facet="jst.appclient" version="1.4"/>
+		    		<requires facet="jst.appclient" version="5.0"/>
+                    <requires facet="jst.connector" version="1.0"/>
+                    <requires facet="jst.connector" version="1.5"/>
+                    <requires facet="jst.ejb" version="1.1"/>
+                    <requires facet="jst.ejb" version="2.0"/>
+                    <requires facet="jst.ejb" version="2.1"/>
+                    <requires facet="jst.ejb" version="3.0"/>
+                    <requires facet="jst.web" version="2.2"/>
+                    <requires facet="jst.web" version="2.3"/>
+                    <requires facet="jst.web" version="2.4"/>
+                    <requires facet="jst.web" version="2.5"/>
+                    <requires facet="jst.utility" version="1.0"/>
+                </or>
+            </constraint>
+        </project-facet-version>
+    </extension>
+    
+    <extension point="org.eclipse.wst.common.project.facet.core.defaultFacets" 
+    	id="org.apache.geronimo.defaultFacets"
+        name="Geronimo Default Facets">
+        <default-facets>
+            <runtime-component id="org.apache.geronimo.runtime" version="1.1"/>
+            <facet id="org.apache.geronimo.facet" version="1.1"/>
+        </default-facets>
+    </extension>
+  
+</plugin>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/pom.xml?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/pom.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/pom.xml Wed Sep 23 08:04:12 2009
@@ -0,0 +1,111 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!-- $Rev: 571684 $ $Date: 2007-09-01 00:15:36 -0400 (Sat, 01 Sep 2007) $ -->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.geronimo.st.v11.core</artifactId>
+    <packaging>jar</packaging>
+    <name>${artifactId}</name>
+    <parent>
+        <groupId>org.apache.geronimo.devtools</groupId>
+        <artifactId>eclipse-plugins-parent</artifactId>
+        <version>2.2.0</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <build>
+        <resources>
+            <resource>
+               <directory>.</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>plugin.xml</include>
+                    <include>plugin.properties</include>
+                    <include>.options</include>
+		    		<include>about.ini</include>
+                </includes>
+            </resource>
+            <!--
+             |
+             | GERONIMODEVTOOLS-482: Ensure filtering is not used on a binary resource 
+             | as it may get inadvertently altered
+             |
+             -->
+            <resource>
+                <directory>.</directory>
+                <includes>
+                    <include>G-logo-32x32.gif</include>
+                </includes>
+            </resource>
+            <resource>
+                <targetPath>META-INF</targetPath>
+                <directory>../..</directory>
+                <includes>
+                    <include>LICENSE.txt</include>
+                    <include>NOTICE.txt</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.devtools</groupId>
+                <artifactId>maven-eclipsepde-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>eclipse</artifactId>
+            <version>${version}</version>
+            <type>pom</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.st.core</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.st.v21.core</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.j2ee.v11.jaxbmodel</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.runtime.v11</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools</groupId>
+            <artifactId>org.apache.geronimo.runtime.common</artifactId>
+            <version>${version}</version>
+        </dependency>
+    </dependencies>
+</project>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/Activator.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/Activator.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/Activator.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @version $Rev: 471551 $ $Date: 2006-11-05 17:47:11 -0500 (Sun, 05 Nov 2006) $
+ */
+public class Activator extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.apache.geronimo.st.v11.core";
+
+	// The shared instance
+	private static Activator plugin;
+
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 * 
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+	
+	public static void log(int severity, String message, Throwable throwable) {
+		plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable));
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoRuntime.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoRuntime.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoRuntime.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoRuntime.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core;
+
+import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
+
+/**
+ * @version $Rev: 491874 $ $Date: 2007-01-02 13:03:16 -0500 (Tue, 02 Jan 2007) $
+ */
+public class GeronimoRuntime extends GeronimoRuntimeDelegate {
+
+	
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core;
+
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+
+import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
+import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
+import org.apache.geronimo.st.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.core.IGeronimoVersionHandler;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.util.SocketUtil;
+
+/**
+ * @version $Rev: 510504 $ $Date: 2007-02-22 08:38:06 -0500 (Thu, 22 Feb 2007) $
+ */
+public class GeronimoServer extends GeronimoServerDelegate {
+
+	private static IGeronimoVersionHandler versionHandler = null;
+	
+	private static DeploymentFactory deploymentFactory;
+	
+	static {
+		deploymentFactory = new DeploymentFactoryImpl();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.GenericGeronimoServer#getContextRoot(org.eclipse.wst.server.core.IModule)
+	 */
+	public String getContextRoot(IModule module) throws Exception {
+		return GeronimoV11Utils.getContextRoot(module);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServer#getDeployerURL()
+	 */
+	public String getDeployerURL() {
+		return "deployer:geronimo:jmx://" + getServer().getHost() + ":" + getRMINamingPort();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServer#getJMXServiceURL()
+	 */
+	public String getJMXServiceURL() {
+		String host = getServer().getHost();
+		return "service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":" + getRMINamingPort() + "/JMXConnector";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServer#getJSR88DeployerJar()
+	 */
+	public IPath getJSR88DeployerJar() {
+		return getServer().getRuntime().getLocation().append("/lib/geronimo-deploy-jsr88-1.1.jar");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServer#getDeploymentFactory()
+	 */
+	public DeploymentFactory getDeploymentFactory() {
+		return deploymentFactory;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServer#configureDeploymentManager(javax.enterprise.deploy.spi.DeploymentManager)
+	 */
+	public void configureDeploymentManager(DeploymentManager dm) {
+		((JMXDeploymentManager) dm).setLogConfiguration(true, true);
+		boolean enableInPlace = SocketUtil.isLocalhost(getServer().getHost()) && isRunFromWorkspace();
+		setInPlaceDeployment(dm, enableInPlace);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServer#getVersionHandler()
+	 */
+	public IGeronimoVersionHandler getVersionHandler() {
+		if (versionHandler == null)
+			versionHandler = new GeronimoV11VersionHandler();
+		return versionHandler;
+	}
+
+	public void setInPlaceDeployment(DeploymentManager dm, boolean enable) {
+		((JMXDeploymentManager) dm).setInPlace(enable);
+	}
+	
+	 public boolean isNotRedeployJSPFiles() {
+	        return getAttribute(PROPERTY_NOT_REDEPLOY_JSP_FILES,false);
+	}
+}
\ No newline at end of file

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v11.core;
+
+import java.net.URL;
+import java.util.Set;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.directory.NoSuchAttributeException;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.PersistentConfigurationList;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.st.core.Activator;
+import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.v11.core.internal.Trace;
+import org.apache.geronimo.system.jmx.KernelDelegate;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.IModulePublishHelper;
+
+/**
+ * @version $Rev: 509683 $ $Date: 2007-02-20 12:47:35 -0500 (Tue, 20 Feb 2007) $
+ */
+public class GeronimoServerBehaviour extends GeronimoServerBehaviourDelegate implements IModulePublishHelper {
+
+	private Kernel kernel = null;
+
+	public GeronimoServerBehaviour() {
+		super();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate#stopKernel()
+	 */
+	protected void stopKernel() {
+		if (kernel != null) {
+			kernel.shutdown();
+			kernel = null;
+		}
+	}
+
+	/**
+	 * @return
+	 * @throws SecurityException
+	 */
+	protected Kernel getKernel() throws SecurityException {
+		if (kernel == null) {
+			try {
+				MBeanServerConnection connection = getServerConnection();
+				if (connection != null)
+					kernel = new KernelDelegate(connection);
+			} catch (SecurityException e) {
+				throw e;
+			} catch (Exception e) {
+				Trace.trace(Trace.WARNING, "Kernel connection failed. "
+						+ e.getMessage());
+			}
+		}
+		return kernel;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServerBehavior#isKernelAlive()
+	 */
+	public boolean isKernelAlive() {
+		try {
+			return getKernel() != null && kernel.isRunning();
+		} catch (SecurityException e) {
+			Activator.log(Status.ERROR, "Invalid username and/or password.", e);
+			pingThread.interrupt();
+			if (getServer().getServerState() != IServer.STATE_STOPPED) {
+				stop(true);
+			}
+		} catch (Exception e) {
+			Activator.log(Status.WARNING, "Geronimo Server may have been terminated manually outside of workspace.", e);
+			kernel = null;
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoServerBehavior#isFullyStarted()
+	 */
+	public boolean isFullyStarted() {
+		if (isKernelAlive()) {
+			AbstractNameQuery query = new AbstractNameQuery(PersistentConfigurationList.class.getName());
+			Set configLists = kernel.listGBeans(query);
+			if (!configLists.isEmpty()) {
+				AbstractName on = (AbstractName) configLists.toArray()[0];
+				try {
+					Boolean b = (Boolean) kernel.getAttribute(on, "kernelFullyStarted");
+					return b.booleanValue();
+				} catch (GBeanNotFoundException e) {
+					// ignore
+				} catch (NoSuchAttributeException e) {
+					// ignore
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			} else {
+				Trace.trace(Trace.INFO, "configLists is empty");
+			}
+		}
+		return false;
+	}
+
+	public IPath getPublishDirectory(IModule[] module) {
+		if (module == null || module.length == 0)
+			return null;
+
+		if (getGeronimoServer().isRunFromWorkspace()) {
+			// TODO fix me, see if project root, component root, or output
+			// container should be returned
+			return module[module.length - 1].getProject().getLocation();
+		} else {
+			ClassLoader old = Thread.currentThread().getContextClassLoader();
+			try {
+				Thread.currentThread().setContextClassLoader(getContextClassLoader());
+				String configId = getConfigId(module[0]);
+				Artifact artifact = Artifact.create(configId);
+				AbstractName name = Configuration.getConfigurationAbstractName(artifact);
+				GBeanData data = kernel.getGBeanData(name);
+				URL url = (URL) data.getAttribute("baseURL");
+				return getModulePath(module, url);
+			} catch (Exception e) {
+				Trace.trace(Trace.SEVERE, "Error in getting publish directory", e);
+			} finally {
+				Thread.currentThread().setContextClassLoader(old);
+			}
+		}
+
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.GenericGeronimoServerBehaviour#getContextClassLoader()
+	 */
+	protected ClassLoader getContextClassLoader() {
+		return Kernel.class.getClassLoader();
+	}
+}
\ No newline at end of file



Mime
View raw message