You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2005/09/14 21:01:03 UTC

svn commit: r280909 [2/52] - in /geronimo/devtools/trunk/modules/eclipse-plugin: ./ features/ features/org.apache.geronimo.feature/ org.apache.geronimo.core/ org.apache.geronimo.deployment.model/ org.apache.geronimo.feature/ org.apache.geronimo.runtime...

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/serverdef/geronimo10.serverdef
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/serverdef/geronimo10.serverdef?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/serverdef/geronimo10.serverdef (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/serverdef/geronimo10.serverdef Wed Sep 14 11:59:30 2005
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:ServerRuntime
+	xmlns:tns="http://eclipse.org/jst/server/generic/ServerTypeDefinition"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://eclipse.org/jst/server/generic/ServerTypeDefinition ServerTypeDefinitionSchema.xsd "
+	name="Apache Geronimo 1.0" version="v1.0">
+<property id="serverRootDirectory"
+	label="%serverRootDirectory"
+	type="directory"
+	context="runtime"
+	default="C:/Geronimo-1.0" />
+<property id="serverAddress"
+	label="%serverAddress"
+	type="string"
+	context="server"
+	default="127.0.0.1" />
+<property id="port"
+	label="%port"
+	type="string"
+	context="server"
+	default="8080" />
+<property id="adminID"
+	label="%adminId"
+	type="string"
+	context="server"
+	default="system" />
+<property id="adminPassword"
+	label="%adminPassword"
+	type="string"
+	context="server"
+	default="manager" />
+<property id="classPath"
+	label="%classPath"
+	type="directory"
+	context="runtime"
+	default="C:/Geronimo-1.0" />
+
+	<port>
+		<no>${port}</no>
+		<name>Http</name>
+		<protocol>http</protocol>
+	</port>
+
+	<module>
+		<type>j2ee.web</type>
+		<publishDir>${serverRootDirectory}/server/deploy</publishDir>
+		<publisherReference>org.eclipse.jst.server.geronimo.internal.GeronimoPublisher</publisherReference>
+	</module>
+	<module>
+		<type>j2ee.ejb</type>
+		<publishDir>${serverRootDirectory}/server/deploy</publishDir>
+		<publisherReference>org.eclipse.jst.server.geronimo.internal.GeronimoPublisher</publisherReference>
+	</module>
+
+	<project>
+		<classpathReference>geronimo.project</classpathReference>
+	</project>
+	
+	<start>
+		<mainClass>org.apache.geronimo.system.main.Daemon</mainClass>
+		<workingDirectory>${serverRootDirectory}/bin</workingDirectory>
+		<programArguments>-v</programArguments>
+		<vmParameters></vmParameters>
+		<classpathReference>geronimo.server</classpathReference>
+	</start>
+
+	<stop>
+		<mainClass>org.apache.geronimo.deployment.cli.DeployTool</mainClass>
+		<workingDirectory>${serverRootDirectory}/bin</workingDirectory>
+		<programArguments>--user ${adminID} --password ${adminPassword}</programArguments>
+		<vmParameters></vmParameters>
+		<classpathReference>geronimo.deploy</classpathReference>
+	</stop>
+
+	<classpath id="geronimo.server">
+		<archive path="${serverRootDirectory}/bin/server.jar" />
+	</classpath>
+
+	<classpath id="geronimo.deploy">
+		<archive path="${serverRootDirectory}/bin/deployer.jar" />
+	</classpath>
+
+	<classpath id="geronimo.project">
+		<archive path="${classPath}/repository/geronimo-spec/jars" />
+		<archive path="${classPath}/lib" />
+	</classpath>
+	
+	<jndiConnection>
+		<providerUrl>jnp://${serverAddress}:1099</providerUrl>
+		<initialContextFactory>org.jnp.interfaces.NamingContextFactory</initialContextFactory>
+		<jndiProperty>
+			<name></name>
+			<value></value>
+		</jndiProperty>
+	</jndiConnection>
+</tns:ServerRuntime>
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentPlanCreationOperation.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,205 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
+import org.apache.geronimo.xml.ns.web.DocumentRoot;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.apache.geronimo.xml.ns.web.WebFactory;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.jst.j2ee.datamodel.properties.IJavaComponentCreationDataModelProperties;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.properties.IFlexibleProjectCreationDataModelProperties;
+import org.openejb.xml.ns.openejb.jar.JarFactory;
+import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
+
+public class DeploymentPlanCreationOperation extends AbstractDataModelOperation {
+
+    public DeploymentPlanCreationOperation() {
+    }
+
+    public DeploymentPlanCreationOperation(IDataModel model) {
+        super(model);
+    }
+
+    public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+
+        if (isGeronimoRuntimeTarget()) {
+
+            IVirtualComponent comp = ComponentCore.createComponent(
+                    getProject(), getComponentName());
+
+            if (comp.getComponentTypeId().equals(
+                    IModuleConstants.JST_WEB_MODULE)) {
+                createGeronimoWebDeploymentPlan(GeronimoUtils
+                        .getWebDeploymentPlanFile(comp));
+            } else if (comp.getComponentTypeId().equals(
+                    IModuleConstants.JST_EJB_MODULE)) {
+                createOpenEjbDeploymentPlan(GeronimoUtils
+                        .getOpenEjbDeploymentPlanFile(comp));
+            } else if (comp.getComponentTypeId().equals(
+                    IModuleConstants.JST_EAR_MODULE)) {
+                createGeronimoApplicationDeploymentPlan(GeronimoUtils
+                        .getApplicationDeploymentPlanFile(comp));
+            }
+        }
+
+        return Status.OK_STATUS;
+
+    }
+
+    public ApplicationType createGeronimoApplicationDeploymentPlan(IFile dpFile) {
+        URI uri = URI
+                .createPlatformResourceURI(dpFile.getFullPath().toString());
+
+        ResourceSet resourceSet = new ResourceSetImpl();
+        GeronimoUtils.registerAppFactoryAndPackage(resourceSet);
+
+        Resource resource = resourceSet.createResource(uri);
+        org.apache.geronimo.xml.ns.j2ee.application.DocumentRoot documentRoot = ApplicationFactory.eINSTANCE
+                .createDocumentRoot();
+        ApplicationType root = ApplicationFactory.eINSTANCE
+                .createApplicationType();
+
+        root.setApplicationName(getComponentName());
+        root.setConfigId(getProject().getName() + "/" + getComponentName());
+
+        documentRoot.setApplication(root);
+        resource.getContents().add(documentRoot);
+
+        doSave(resource);
+
+        return root;
+    }
+
+    public WebAppType createGeronimoWebDeploymentPlan(IFile dpFile) {
+
+        URI uri = URI
+                .createPlatformResourceURI(dpFile.getFullPath().toString());
+
+        ResourceSet resourceSet = new ResourceSetImpl();
+        GeronimoUtils.registerWebFactoryAndPackage(resourceSet);
+
+        Resource resource = resourceSet.createResource(uri);
+        DocumentRoot documentRoot = WebFactory.eINSTANCE.createDocumentRoot();
+        WebAppType root = WebFactory.eINSTANCE.createWebAppType();
+
+        root.setConfigId(getProject().getName() + "/" + getComponentName());
+        root.setContextRoot("/" + getComponentName());
+        root.setContextPriorityClassloader(false);
+
+        documentRoot.setWebApp(root);
+        resource.getContents().add(documentRoot);
+
+        doSave(resource);
+
+        return root;
+    }
+
+    public OpenejbJarType createOpenEjbDeploymentPlan(IFile dpFile) {
+        URI uri = URI
+                .createPlatformResourceURI(dpFile.getFullPath().toString());
+
+        ResourceSet resourceSet = new ResourceSetImpl();
+        GeronimoUtils.registerEjbFactoryAndPackage(resourceSet);
+
+        Resource resource = resourceSet.createResource(uri);
+        org.openejb.xml.ns.openejb.jar.DocumentRoot documentRoot = JarFactory.eINSTANCE
+                .createDocumentRoot();
+        OpenejbJarType root = JarFactory.eINSTANCE.createOpenejbJarType();
+
+        root.setConfigId(getProject().getName() + "/" + getComponentName());
+
+        documentRoot.setOpenejbJar(root);
+        resource.getContents().add(documentRoot);
+
+        doSave(resource);
+
+        return root;
+    }
+
+    public boolean isGeronimoRuntimeTarget() {
+
+        String runtimeTarget = model.getProperty(
+                IJavaComponentCreationDataModelProperties.RUNTIME_TARGET_ID)
+                .toString();
+
+        return runtimeTarget.startsWith("Apache Geronimo");
+
+    }
+
+    public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+        return null;
+    }
+
+    public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+        return null;
+    }
+
+    public String getComponentName() {
+        return model.getProperty(
+                IComponentCreationDataModelProperties.COMPONENT_NAME)
+                .toString();
+    }
+
+    public IProject getProject() {
+        String projectName = model.getProperty(
+                IFlexibleProjectCreationDataModelProperties.PROJECT_NAME)
+                .toString();
+        if (projectName != null) {
+            return ResourcesPlugin.getWorkspace().getRoot().getProject(
+                    projectName);
+        }
+        return null;
+    }
+
+    private void doSave(Resource resource) {
+        if (resource instanceof XMIResource) {
+            ((XMIResource) resource).setEncoding("UTF-8");
+        }
+
+        try {
+            resource.save(Collections.EMPTY_MAP);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentStatusMessageTranslator.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentStatusMessageTranslator.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentStatusMessageTranslator.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/DeploymentStatusMessageTranslator.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,64 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.shared.StateType;
+import javax.enterprise.deploy.spi.status.DeploymentStatus;
+import javax.enterprise.deploy.spi.status.ProgressEvent;
+
+import org.eclipse.core.resources.IProject;
+
+public class DeploymentStatusMessageTranslator {
+
+	public static String getTranslatedMessage(ProgressEvent event, IProject project) {
+		DeploymentStatus status = event.getDeploymentStatus();
+		if (status != null) {
+			String result = translateCommand(status.getCommand()) + " ";
+			result = result.concat("project " + project.getName()) + " ";			
+			return result.concat((status.getState().toString())) + getMessageSuffix(status.getState());
+		}
+		return "";
+	}
+	
+	private static String getMessageSuffix(StateType state) {
+		if(state == StateType.RUNNING) {
+			return "...";
+		} 
+		return ".";
+	}
+
+	private static String translateCommand(CommandType type) {
+		if (type == CommandType.DISTRIBUTE) {
+			return "Distributing";
+		}
+
+		if (type == CommandType.START) {
+			return "Starting";
+		}
+
+		if (type == CommandType.REDEPLOY) {
+			return "Redeploying";
+		}
+
+		if (type == CommandType.UNDEPLOY) {
+			return "Undeploying";
+		}
+
+		return "";
+	}
+
+}

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoPlugin.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoPlugin.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoPlugin.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoPlugin.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import org.eclipse.core.runtime.Plugin;
+
+/**
+ * The main plugin class.
+ */
+public class GeronimoPlugin extends Plugin {
+    protected static final String PLUGIN_ID = "org.apache.geronimo.core";
+
+    private static GeronimoPlugin singleton;
+
+    /**
+     * The constructor.
+     */
+    public GeronimoPlugin() {
+        super();
+        singleton = this;
+    }
+
+    /**
+     * Returns the singleton instance of this plugin.
+     * 
+     * @return org.eclipse.jst.server.geronimo.core.internal.GeronimoPlugin
+     */
+    public static GeronimoPlugin getInstance() {
+        return singleton;
+    }
+}
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServer.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServer.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServer.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServer.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,83 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import java.net.URL;
+
+import org.eclipse.jst.server.core.IWebModule;
+import org.eclipse.jst.server.generic.core.internal.GenericServer;
+import org.eclipse.jst.server.generic.core.internal.Trace;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.internal.ServerMonitorManager;
+
+public class GeronimoServer extends GenericServer {
+
+    public static final String PROPERTY_ADMIN_ID = "adminID";
+
+    public static final String PROPERTY_ADMIN_PW = "adminPassword";
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.wst.server.core.model.IURLProvider#getModuleRootURL(org.eclipse.wst.server.core.IModule)
+     */
+    public URL getModuleRootURL(IModule module) {
+        try {
+            if (module == null
+                    || module.loadAdapter(IWebModule.class, null) == null)
+                return null;
+
+            String url = "http://localhost";
+            int port = 0;
+
+            port = getHttpPort();
+            port = ServerMonitorManager.getInstance().getMonitoredPort(
+                    getServer(), port, "web");
+            if (port != 80)
+                url += ":" + port;
+
+            String moduleId = GeronimoUtils.getContextRoot(module);
+            if (!moduleId.startsWith("/"))
+                url += "/";
+            url += moduleId;
+
+            if (!url.endsWith("/"))
+                url += "/";
+
+            return new URL(url);
+        } catch (Exception e) {
+            Trace.trace("Could not get root URL", e);
+            return null;
+        }
+
+    }
+
+    public String getAdminID() {
+       return (String) getServerInstancePropertiesImpl().get(PROPERTY_ADMIN_ID);      
+    }
+
+    public String getAdminPassword() {
+        return (String) getServerInstancePropertiesImpl().get(PROPERTY_ADMIN_PW);      
+    }
+
+    public void setAdminID(String value) {
+        getServerInstancePropertiesImpl().put(PROPERTY_ADMIN_ID, value);    
+    }
+
+    public void setAdminPassword(String value) {
+        getServerInstancePropertiesImpl().put(PROPERTY_ADMIN_PW, value);    
+    }
+}
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,529 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.shared.factories.DeploymentFactoryManager;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.Target;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+import javax.enterprise.deploy.spi.exceptions.TargetException;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import javax.enterprise.deploy.spi.status.DeploymentStatus;
+import javax.enterprise.deploy.spi.status.ProgressEvent;
+import javax.enterprise.deploy.spi.status.ProgressListener;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
+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.jmx.KernelDelegate;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.server.core.IJ2EEModule;
+import org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+
+public class GeronimoServerBehaviour extends GenericServerBehaviour {
+
+	private final static String DEFAULT_URI = "deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector";
+
+	private final static String J2EE_DEPLOYER_ID = "org/apache/geronimo/RuntimeDeployer";
+    
+    private static final int MAX_TRIES = 10;
+    
+    private static final long TIMEOUT = 100000;
+
+	private DeploymentFactoryManager dfm = null;
+
+	private DeploymentManager dm = null;
+
+	private IProgressMonitor _monitor = null;
+
+	private Kernel kernel = null;
+
+	public GeronimoServerBehaviour() {
+		super();
+	}
+
+	private void discoverDeploymentFactory() {
+
+		try {
+			JarFile deployerJar = new JarFile(getServer().getRuntime().getLocation().append(
+					"/deployer.jar").toFile());
+			java.util.jar.Manifest manifestFile = deployerJar.getManifest();
+			Attributes attributes = manifestFile.getMainAttributes();
+			String key = "J2EE-DeploymentFactory-Implementation-Class";
+			String className = attributes.getValue(key);
+			dfm = DeploymentFactoryManager.getInstance();
+			Class deploymentFactory = Class.forName(className);
+			DeploymentFactory deploymentFactoryInstance = (DeploymentFactory) deploymentFactory
+					.newInstance();
+			dfm.registerDeploymentFactory(deploymentFactoryInstance);
+		} catch (IOException e) {
+			e.printStackTrace();
+		} catch (ClassNotFoundException e) {
+			e.printStackTrace();
+		} catch (InstantiationException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public DeploymentManager getDeploymentManager() throws DeploymentManagerCreationException {
+
+		if (dm == null) {
+			discoverDeploymentFactory();
+			if (dfm != null) {
+				dm = dfm.getDeploymentManager(DEFAULT_URI, getUserName(), getPassword());
+			} else {
+				DeploymentFactory df = new DeploymentFactoryImpl();
+				dm = df.getDeploymentManager(DEFAULT_URI, getUserName(), getPassword());
+			}
+		}
+		return dm;
+	}
+
+	private String getUserName() {        
+        GeronimoServer server = (GeronimoServer) getServer().getAdapter(GeronimoServer.class);
+		return server.getAdminID();
+	}
+
+	private String getPassword() {
+        GeronimoServer server = (GeronimoServer) getServer().getAdapter(GeronimoServer.class);
+        return server.getAdminPassword();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#stop(boolean)
+	 */
+	public void stop(boolean force) {       
+	               
+		if (getKernel() != null) {
+            //lets shutdown the kernel so shutdown messages are displayed in the console view
+			kernel.shutdown();
+		}           
+                
+
+		dm = null;
+		kernel = null;
+        
+		//kill the process
+		super.stop(true);
+	}
+
+	private Kernel getKernel() {
+
+		int tries = MAX_TRIES;
+
+		if (kernel == null) {
+
+			Map map = new HashMap();
+			map.put("jmx.remote.credentials", new String[] { getUserName(), getPassword() });
+			try {
+				JMXServiceURL address = new JMXServiceURL(
+						"service:jmx:rmi://localhost/jndi/rmi:/JMXConnector");
+				do {
+					try {
+
+						JMXConnector jmxConnector = JMXConnectorFactory.connect(address, map);
+						MBeanServerConnection mbServerConnection = jmxConnector
+								.getMBeanServerConnection();
+						kernel = new KernelDelegate(mbServerConnection);
+						Trace.trace(Trace.INFO, "Connected to kernel.");
+						break;
+					} catch (Exception e) {
+						Thread.sleep(3000);
+						tries--;
+						if (tries != 0) {
+                            Trace.trace(Trace.WARNING,"Couldn't connect to kernel.  Trying again...");
+						} else {
+                            Trace.trace(Trace.SEVERE,"Connection to Geronimo kernel failed.", e);
+						}
+					}
+				} while (tries > 0);
+			} catch (MalformedURLException e) {
+				e.printStackTrace();
+			} catch (InterruptedException e) {
+				e.printStackTrace();
+			}
+		}
+
+		return kernel;
+	}
+
+	protected void setServerStarted() {
+
+		boolean started = false;
+
+		try {
+			ObjectName configName = Configuration.getConfigurationObjectName(new URI(
+					J2EE_DEPLOYER_ID));
+
+			for (int tries = MAX_TRIES; tries > 0 && !started; tries--) {
+				try {
+					if (getKernel() != null) {
+						if (kernel.getGBeanState(configName) == 1) {
+							started = true;
+                            setServerState(IServer.STATE_STARTED);
+							Trace.trace(Trace.INFO, "RuntimeDeployer has started.");
+						} else {
+							Trace.trace(Trace.INFO, "RuntimeDeployer has not yet started.");
+						}
+					}
+				} catch (InternalKernelException e) {
+				} catch (GBeanNotFoundException e) {
+				}
+				Thread.sleep(2000);
+			}
+		} catch (MalformedObjectNameException e) {
+			e.printStackTrace();
+		} catch (URISyntaxException e) {
+			e.printStackTrace();
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+		
+		if (!started) {
+			Trace.trace(Trace.SEVERE, "Runtime deployer failed to start.");
+		}		
+
+	}
+
+	public void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor)
+			throws CoreException {                
+
+		_monitor = monitor;
+
+		// Can only publish when the server is running
+		int state = getServer().getServerState();
+		if (state == IServer.STATE_STOPPED || state == IServer.STATE_STOPPING) {
+			throw new CoreException(Status.CANCEL_STATUS);
+		}
+
+		if (state == IServer.STATE_STARTING) {
+			int timeout = 25;
+			while (getServer().getServerState() == IServer.STATE_STARTING) {
+				if (--timeout == 0)
+					throw new CoreException(Status.CANCEL_STATUS);
+				try {
+					Thread.sleep(1000);
+				} catch (InterruptedException e) {
+					e.printStackTrace();
+				}
+			}
+		}
+
+		if (deltaKind == NO_CHANGE) // Temporary workaround for WTP server tools
+			// bug
+			deltaKind = CHANGED;
+
+		if (!(deltaKind == ADDED || deltaKind == REMOVED || deltaKind == CHANGED))
+			return;
+
+		invokeCommand(deltaKind, module[module.length - 1]);
+	}
+
+	class WaitForNotificationThread extends Thread {
+		public void run() {
+			try {
+				sleep(TIMEOUT);
+			} catch (InterruptedException e) {
+			}
+		}
+	}
+
+	class GeronimoDeploymentProgressListener implements ProgressListener {
+
+		private Thread waitThread;
+
+		private CommandType cmd = null;
+
+		private IProject project = null;
+
+		public String lastMessage = null;
+
+		public GeronimoDeploymentProgressListener() {
+			waitThread = new WaitForNotificationThread();
+		}
+
+		public void handleProgressEvent(ProgressEvent event) {
+			String message = DeploymentStatusMessageTranslator.getTranslatedMessage(event, project);			
+			if (!message.equals(lastMessage)) {
+                _monitor.setTaskName(message);
+				Trace.trace(Trace.INFO,message);
+			}
+			lastMessage = message;
+			DeploymentStatus status = event.getDeploymentStatus();
+			if (status.getMessage() != null) {
+				Trace.trace(Trace.INFO,"\t" + status.getMessage());
+				_monitor.subTask(status.getMessage());
+			}
+			if (cmd == null || cmd == status.getCommand()) {
+				if (status.isCompleted() || status.isFailed()) {
+					waitThread.interrupt();
+				}
+			}
+		}
+
+		public void start() {
+			waitThread.start();
+		}
+
+		public void setType(CommandType cmd) {
+			this.cmd = cmd;
+		}
+
+		public Thread getWaitThread() {
+			return waitThread;
+		}
+
+		public void setProject(IProject project) {
+			this.project = project;
+		}
+	}
+
+	private void waitForCompletion(ProgressObject po, GeronimoDeploymentProgressListener listener,
+			CommandType cmd, IProject project) {
+
+		listener.setType(cmd);
+		listener.setProject(project);
+
+		po.addProgressListener(listener);
+
+		try {
+			listener.getWaitThread().join();
+		} catch (InterruptedException e) {
+
+		} finally {
+			po.removeProgressListener(listener);
+		}
+	}
+
+	private void invokeCommand(int deltaKind, IModule module) throws CoreException {
+
+		GeronimoUtils.getConfigId(module); //triggers web dp creation
+
+		//GeronimoUtils.copyDeploymentPlanToDeployable(module); // Temporary
+
+		try {
+			switch (deltaKind) {
+			case ADDED: {
+				doDeploy(module);
+				break;
+			}
+			case CHANGED: {
+				doReploy(module);
+				break;
+			}
+			case REMOVED: {
+				doUndeploy(module);
+				break;
+			}
+			default:
+				throw new IllegalArgumentException();
+			}
+		}  catch (DeploymentManagerCreationException e) {			
+			e.printStackTrace();
+			throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.jst.geronimo.core", 0,e.getMessage(), e));
+		}
+	}
+
+	private void doDeploy(IModule module) throws CoreException, DeploymentManagerCreationException {
+
+		IJ2EEModule j2eeModule = (IJ2EEModule) module.loadAdapter(IJ2EEModule.class, null);
+
+		Target[] targets = getDeploymentManager().getTargets();
+		File jarFile = createJarFile(j2eeModule.getLocation());
+
+		GeronimoDeploymentProgressListener listener = createAndStartListener();
+
+		ProgressObject po = getDeploymentManager().distribute(targets, jarFile, null);
+		waitForCompletion(po, listener, CommandType.DISTRIBUTE, module.getProject());
+
+		if (po.getDeploymentStatus().isCompleted()) {
+
+			listener = createAndStartListener();
+
+			po = getDeploymentManager().start(po.getResultTargetModuleIDs());
+			waitForCompletion(po, listener, CommandType.START, module.getProject());
+
+			if (po.getDeploymentStatus().isCompleted()) {
+
+			} else if (po.getDeploymentStatus().isFailed()) {
+				// TODO handle fail
+			}
+		} else if (po.getDeploymentStatus().isFailed()) {
+			IStatus status = new Status(IStatus.ERROR, "org.eclipse.jst.geronimo.core", 0, "Distribution of application failed.  See .log for details.", new Exception(listener.lastMessage));
+			throw new CoreException(status);
+		}
+	}
+
+	private void doReploy(IModule module) throws CoreException, DeploymentManagerCreationException{
+
+		IJ2EEModule j2eeModule = (IJ2EEModule) module.loadAdapter(IJ2EEModule.class, null);
+
+		TargetModuleID id = getTargetModuleID(module);
+		if (id != null) {
+			File jarFile = createJarFile(j2eeModule.getLocation());
+			GeronimoDeploymentProgressListener listener = createAndStartListener();
+			ProgressObject po = getDeploymentManager().redeploy(new TargetModuleID[] { id },
+					jarFile, null);
+			waitForCompletion(po, listener, CommandType.REDEPLOY, module.getProject());
+			if (po.getDeploymentStatus().isCompleted()) {
+
+			} else if (po.getDeploymentStatus().isFailed()) {
+				// TODO handle fail
+			}
+		}
+	}
+
+	private void doUndeploy(IModule module) throws CoreException, DeploymentManagerCreationException {
+		TargetModuleID id = getTargetModuleID(module);
+		if (id != null) {
+			GeronimoDeploymentProgressListener listener = createAndStartListener();
+			ProgressObject po = getDeploymentManager().undeploy(new TargetModuleID[] { id });
+			waitForCompletion(po, listener, CommandType.UNDEPLOY, module.getProject());
+			if (po.getDeploymentStatus().isCompleted()) {
+
+			} else if (po.getDeploymentStatus().isFailed()) {
+				// TODO handle fail
+			}
+		}
+	}
+
+	private GeronimoDeploymentProgressListener createAndStartListener() {
+		GeronimoDeploymentProgressListener listener = new GeronimoDeploymentProgressListener();
+		listener.start();
+		return listener;
+	}
+
+	// TODO find a better way to get TargetModuleID for IModule
+	private TargetModuleID getTargetModuleID(IModule module) throws DeploymentManagerCreationException {
+		try {
+			TargetModuleID ids[] = getDeploymentManager().getAvailableModules(
+					GeronimoUtils.getJSR88ModuleType(module), getDeploymentManager().getTargets());
+			if (ids != null) {
+				for (int i = 0; i < ids.length; i++) {
+					if (ids[i].getModuleID().equals(GeronimoUtils.getConfigId(module))) {
+						return ids[i];
+					}
+				}
+			}
+		} catch (IllegalStateException e) {
+			e.printStackTrace();
+		} catch (TargetException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	private File createJarFile(IPath location) {
+
+		try {
+
+			String rootFilename = location.toOSString();
+
+			File rootDir = new File(rootFilename);
+			String zipFilePrefix = rootDir.getName();
+			if (zipFilePrefix.length() < 3)
+				zipFilePrefix += "123";
+			File zipFile = File.createTempFile(zipFilePrefix, null);
+
+			if (zipFile.exists())
+				zipFile.delete();
+
+			FileOutputStream fos = new FileOutputStream(zipFile);
+			JarOutputStream jos = new JarOutputStream(fos);
+
+			addToJar("", rootDir, jos);
+
+			jos.close();
+			fos.close();
+
+			zipFile.deleteOnExit();
+
+			return zipFile;
+
+		} catch (IOException e) {
+			Trace.trace(Trace.SEVERE, "Error creating zip file", e);
+			return null;
+		}
+	}
+
+	private void addToJar(String namePrefix, File dir, JarOutputStream jos) throws IOException {
+		File[] contents = dir.listFiles();
+		for (int i = 0; i < contents.length; i++) {
+			File f = contents[i];
+			if (f.isDirectory()) {
+				// Recurse into the directory
+				addToJar(namePrefix + f.getName() + "/", f, jos);
+			} else {
+				JarEntry entry = new JarEntry(namePrefix + f.getName());
+				jos.putNextEntry(entry);
+
+				byte[] buffer = new byte[10000];
+				FileInputStream fis = new FileInputStream(f);
+				int bytesRead = 0;
+				while (bytesRead != -1) {
+					bytesRead = fis.read(buffer);
+					if (bytesRead > 0)
+						jos.write(buffer, 0, bytesRead);
+				}
+			}
+		}
+	}
+
+	protected List getPublishClasspath() {
+		String cpRef = getServerDefinition().getStop().getClasspathReference();
+		return serverClasspath(cpRef);
+	}
+
+	public Map getServerInstanceProperties() {
+		return getRuntimeDelegate().getServerInstanceProperties();
+	}
+
+}
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerRuntimeTargetHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerRuntimeTargetHandler.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerRuntimeTargetHandler.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoServerRuntimeTargetHandler.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,123 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.server.generic.core.internal.GenericServerRuntimeTargetHandler;
+import org.eclipse.jst.server.generic.core.internal.ServerTypeDefinitionUtil;
+import org.eclipse.jst.server.generic.servertype.definition.ArchiveType;
+import org.eclipse.jst.server.generic.servertype.definition.Classpath;
+import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
+import org.eclipse.wst.server.core.IRuntime;
+
+public class GeronimoServerRuntimeTargetHandler extends
+		GenericServerRuntimeTargetHandler {
+	
+	String cachedArchiveString=null;
+	IClasspathEntry[] cachedClasspath=null;
+	
+
+	/* (non-Javadoc)
+	 * @see ClasspathRuntimeTargetHandler#resolveClasspathContainer(IRuntime, java.lang.String)
+	 */
+	public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime,String id){		
+		return getServerClassPathEntry(runtime);
+	}
+	
+	public IClasspathEntry[] getServerClassPathEntry(IRuntime runtime)
+	{
+		ServerRuntime serverDefinition = ServerTypeDefinitionUtil.getServerTypeDefinition(runtime);		
+		String ref = serverDefinition.getProject().getClasspathReference();
+		Classpath cp = serverDefinition.getClasspath(ref);
+		List archives = cp.getArchive();
+		
+		// It's expensive to keep searching directories, so try to cache the result
+		IClasspathEntry[] savedClasspath=getCachedClasspathFor(serverDefinition, archives);
+		if(savedClasspath!=null)
+			return savedClasspath;
+		
+		Iterator archiveIter = archives.iterator();
+		ArrayList entryList = new ArrayList();
+		while (archiveIter.hasNext()) {
+			ArchiveType archive = (ArchiveType) archiveIter.next();
+			String item = serverDefinition.getResolver().resolveProperties(archive.getPath());
+			Path path=new Path(item);
+			File file=path.toFile();
+			if(file.isDirectory())
+			{
+				File[] list=file.listFiles();
+				for(int i=0; i<list.length; i++)
+				{
+					if(!list[i].isDirectory())
+					{
+						Path p=new Path(list[i].getAbsolutePath());
+						IClasspathEntry entry = JavaCore.newLibraryEntry(p,null,null );
+						entryList.add(entry);	
+					}					
+				}
+	
+			}
+			else
+			{
+				IClasspathEntry entry = JavaCore.newLibraryEntry(path,null,null );
+				entryList.add(entry);
+			}
+		}
+		
+		IClasspathEntry[] classpath=(IClasspathEntry[])entryList.toArray(new IClasspathEntry[entryList.size()]);
+		setCachedClasspath(classpath);
+
+		return classpath;
+	}
+
+	private IClasspathEntry[] getCachedClasspathFor(ServerRuntime serverDefinition, List archives) {
+		
+		// Need to iterate through the list, and expand the variables (in case they have changed)
+		// The simplest approach is to construct/cache a string for this
+		// That will still save the overhead of going to the filesystem
+		
+		StringBuffer buffer=new StringBuffer();
+		Iterator archiveIter = archives.iterator();
+		while (archiveIter.hasNext()) {
+			ArchiveType archive = (ArchiveType) archiveIter.next();
+			String item = serverDefinition.getResolver().resolveProperties(archive.getPath());
+			buffer.append(item);
+			buffer.append(File.pathSeparatorChar);
+		}
+		
+		String archiveString=buffer.toString();
+		
+		if(cachedArchiveString != null && cachedArchiveString.equals(archiveString))
+			return cachedClasspath;
+		
+		// This is a cache miss - ensure the data is null (to be safe), but save the key (archiveString) now
+		// The data will be set once it's calculated
+		cachedClasspath=null;
+		cachedArchiveString=archiveString;
+		return null;
+	}
+
+	private void setCachedClasspath(IClasspathEntry[] classpath) {
+		cachedClasspath=classpath;
+	}
+}

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoUtils.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoUtils.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoUtils.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/GeronimoUtils.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,313 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import javax.enterprise.deploy.shared.ModuleType;
+
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
+import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.application.util.ApplicationResourceFactoryImpl;
+import org.apache.geronimo.xml.ns.web.DocumentRoot;
+import org.apache.geronimo.xml.ns.web.WebAppType;
+import org.apache.geronimo.xml.ns.web.WebPackage;
+import org.apache.geronimo.xml.ns.web.util.WebResourceFactoryImpl;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable;
+import org.eclipse.jst.server.core.IJ2EEModule;
+import org.eclipse.jst.server.core.IWebModule;
+import org.eclipse.wst.common.componentcore.ArtifactEdit;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IFlexibleProject;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.server.core.IModule;
+import org.openejb.xml.ns.openejb.jar.JarPackage;
+import org.openejb.xml.ns.openejb.jar.OpenejbJarType;
+import org.openejb.xml.ns.openejb.jar.util.JarResourceFactoryImpl;
+
+public class GeronimoUtils {
+
+    public static final String WEB_PLAN_NAME = "geronimo-web.xml";
+
+    public static final String OPENEJB_PLAN_NAME = "openejb-jar.xml";
+
+    public static final String APP_PLAN_NAME = "geronimo-application.xml";
+
+    public static String getConfigId(IModule module) {
+
+        String configId = null;
+
+        if (isWebModule(module)) {
+            WebAppType deploymentPlan = getWebDeploymentPlan(module);
+
+            if (deploymentPlan != null)
+                configId = deploymentPlan.getConfigId();
+
+            if (configId == null)
+                configId = getId(module);
+        } else if (isEjbJarModule(module)) {
+            configId = getId(module);
+        }
+
+        return configId;
+    }
+
+    public static boolean isWebModule(IModule module) {
+        return "j2ee.web".equals(module.getModuleType().getId());
+    }
+
+    public static boolean isEjbJarModule(IModule module) {
+        return "j2ee.ejb".equals(module.getModuleType().getId());
+    }
+
+    public static ModuleType getJSR88ModuleType(IModule module) {
+        if (isWebModule(module)) {
+            return ModuleType.WAR;
+        } else if (isEjbJarModule(module)) {
+            return ModuleType.EJB;
+        }
+        return null;
+    }
+
+    public static String getContextRoot(IModule module) {
+        String contextRoot = null;
+
+        WebAppType deploymentPlan = getWebDeploymentPlan(module);
+        if (deploymentPlan != null)
+            contextRoot = deploymentPlan.getContextRoot();
+
+        if (contextRoot == null)
+            contextRoot = getId(module);
+
+        return contextRoot;
+    }
+
+    public static String getId(IModule module) {
+        // use the module ID
+        String moduleId = module.getId();
+
+        IJ2EEModule j2eeModule = (IJ2EEModule) module.loadAdapter(
+                IJ2EEModule.class, null);
+        if (j2eeModule != null && j2eeModule instanceof J2EEFlexProjDeployable) {
+            J2EEFlexProjDeployable j2eeFlex = (J2EEFlexProjDeployable) j2eeModule;
+            // j2eeFlex
+            ArtifactEdit edit = null;
+
+            try {
+                edit = ArtifactEdit.getArtifactEditForRead(j2eeFlex
+                        .getComponentHandle());
+                XMIResource res = (XMIResource) edit.getContentModelRoot()
+                        .eResource();
+                moduleId = res.getID(edit.getContentModelRoot());
+            } finally {
+                if (edit != null)
+                    edit.dispose();
+            }
+        }
+
+        if (moduleId != null && moduleId.length() > 0)
+            return moduleId;
+
+        // ...but if there is no defined module ID, pick the best alternative
+
+        IPath moduleLocation = j2eeModule.getLocation();
+        if (moduleLocation != null) {
+            moduleId = moduleLocation.removeFileExtension().lastSegment();
+        }
+
+        if (j2eeModule instanceof IWebModule) {
+            // A better choice is to use the context root
+            // For wars most appservers use the module name
+            // as the context root
+            String contextRoot = ((IWebModule) j2eeModule).getContextRoot();
+            if (contextRoot.charAt(0) == '/')
+                moduleId = contextRoot.substring(1);
+        }
+
+        return moduleId;
+    }
+
+    public static ApplicationType getApplicationDeploymentPlan(
+            IVirtualComponent comp) {
+        IFile dpPlan = getApplicationDeploymentPlanFile(comp);
+        return getApplicationDeploymentPlan(dpPlan);
+    }
+
+    public static WebAppType getWebDeploymentPlan(IVirtualComponent comp) {
+        IFile dpPlan = getWebDeploymentPlanFile(comp);
+        return getWebDeploymentPlan(dpPlan);
+    }
+
+    public static OpenejbJarType getOpenEjbDeploymentPlan(IVirtualComponent comp) {
+        IFile dpPlan = getOpenEjbDeploymentPlanFile(comp);
+        return getOpenEjbDeploymentPlan(dpPlan);
+    }
+
+    public static ApplicationType getApplicationDeploymentPlan(IFile file) {
+        if (file.getName().equals(APP_PLAN_NAME) && file.exists()) {
+            ResourceSet resourceSet = new ResourceSetImpl();
+            registerAppFactoryAndPackage(resourceSet);
+            Resource resource = load(file, resourceSet);
+            if (resource != null) {
+                return ((org.apache.geronimo.xml.ns.j2ee.application.DocumentRoot) resource
+                        .getContents().get(0)).getApplication();
+            }
+
+        }
+        return null;
+    }
+
+    public static WebAppType getWebDeploymentPlan(IFile file) {
+        if (file.getName().equals(WEB_PLAN_NAME) && file.exists()) {
+            ResourceSet resourceSet = new ResourceSetImpl();
+            registerWebFactoryAndPackage(resourceSet);
+            Resource resource = load(file, resourceSet);
+            if (resource != null) {
+                return ((DocumentRoot) resource.getContents().get(0))
+                        .getWebApp();
+            }
+
+        }
+        return null;
+    }
+
+    public static OpenejbJarType getOpenEjbDeploymentPlan(IFile file) {
+        if (file.getName().equals(OPENEJB_PLAN_NAME) && file.exists()) {
+            ResourceSet resourceSet = new ResourceSetImpl();
+            registerEjbFactoryAndPackage(resourceSet);
+            Resource resource = load(file, resourceSet);
+            if (resource != null) {
+                return ((org.openejb.xml.ns.openejb.jar.DocumentRoot) resource
+                        .getContents().get(0)).getOpenejbJar();
+            }
+        }
+        return null;
+    }
+
+    public static IFile getWebDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder()
+                .getProjectRelativePath().append("WEB-INF").append(
+                        WEB_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+
+    }
+
+    public static IFile getOpenEjbDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder()
+                .getProjectRelativePath().append("META-INF").append(
+                        OPENEJB_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+
+    }
+
+    public static IFile getApplicationDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder()
+                .getProjectRelativePath().append("META-INF").append(
+                        APP_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+
+    }
+
+    public static WebAppType getWebDeploymentPlan(IModule module) {
+        return getWebDeploymentPlan(getVirtualComponent(module));
+    }
+
+    private static IVirtualComponent getVirtualComponent(IModule module) {
+        IProject project = module.getProject();
+
+        IFlexibleProject flexProject = ComponentCore
+                .createFlexibleProject(project);
+        IVirtualComponent component = flexProject
+                .getComponent(module.getName());
+        return component;
+    }
+
+    private static Resource load(IFile dpFile, ResourceSet resourceSet) {
+        try {
+
+            URI uri = URI.createPlatformResourceURI(dpFile.getFullPath()
+                    .toString());
+
+            Resource resource = resourceSet.createResource(uri);
+            if (!resource.isLoaded()) {
+                resource.load(null);
+            }
+            return resource;
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * Register the appropriate resource factory to handle all file extentions.
+     * Register the package to ensure it is available during loading.
+     * 
+     * @param resourceSet
+     */
+    public static void registerWebFactoryAndPackage(ResourceSet resourceSet) {
+        resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
+                .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
+                        new WebResourceFactoryImpl());
+
+        resourceSet.getPackageRegistry().put(WebPackage.eNS_URI,
+                WebPackage.eINSTANCE);
+
+    }
+
+    /**
+     * Register the appropriate resource factory to handle all file extentions.
+     * Register the package to ensure it is available during loading.
+     * 
+     * @param resourceSet
+     */
+    public static void registerEjbFactoryAndPackage(ResourceSet resourceSet) {
+        resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
+                .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
+                        new JarResourceFactoryImpl());
+        resourceSet.getPackageRegistry().put(JarPackage.eNS_URI,
+                JarPackage.eINSTANCE);
+
+    }
+
+    /**
+     * Register the appropriate resource factory to handle all file extentions.
+     * Register the package to ensure it is available during loading.
+     * 
+     * @param resourceSet
+     */
+    public static void registerAppFactoryAndPackage(ResourceSet resourceSet) {
+        resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
+                .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
+                        new ApplicationResourceFactoryImpl());
+
+        resourceSet.getPackageRegistry().put(ApplicationPackage.eNS_URI,
+                ApplicationPackage.eINSTANCE);
+
+    }
+
+}
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,26 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+
+import org.eclipse.osgi.util.NLS;
+/**
+ * Translated messages.
+ */
+public class Messages extends NLS {
+	static {
+		NLS.initializeMessages(GeronimoPlugin.PLUGIN_ID + ".internal.Messages", Messages.class);
+	}
+}
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.properties
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.properties?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.properties (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Messages.properties Wed Sep 14 11:59:30 2005
@@ -0,0 +1 @@
+

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Trace.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Trace.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Trace.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/internal/Trace.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,70 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.internal;
+/**
+ * Helper class to route trace output.
+ */
+public class Trace {
+
+	/**
+	 * Finest trace event.
+	 */
+	public static byte INFO = 0;
+    
+    /**
+     * Warning trace event.
+     */
+    public static byte WARNING = 1;
+    
+    /**
+     * Severe trace event.
+     */
+    public static byte SEVERE = 2;
+
+
+	/**
+	 * Trace constructor comment.
+	 */
+	private Trace() {
+		super();
+	}
+
+	/**
+	 * Trace the given text.
+	 *
+	 * @param level the trace level
+	 * @param s a message
+	 */
+	public static void trace(byte level, String s) {
+		trace(level, s, null);
+	}
+
+	/**
+	 * Trace the given message and exception.
+	 *
+	 * @param level the trace level
+	 * @param s a message
+	 * @param t a throwable
+	 */
+	public static void trace(byte level, String s, Throwable t) {
+		if (!GeronimoPlugin.getInstance().isDebugging())
+			return;
+
+		System.out.println(GeronimoPlugin.PLUGIN_ID + ":  " + s);
+		if (t != null)
+			t.printStackTrace();
+	}
+}
\ No newline at end of file

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanDataModelProvider.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanDataModelProvider.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanDataModelProvider.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanDataModelProvider.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,44 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.operations;
+
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
+
+/**
+ * 
+ * 
+ */
+public class ExportDeploymentPlanDataModelProvider extends
+        AbstractDataModelProvider implements
+        IExportDeploymentPlanDataModelProperties {
+
+    /**
+     * 
+     */
+    public ExportDeploymentPlanDataModelProvider() {
+        super();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider#getPropertyNames()
+     */
+    public String[] getPropertyNames() {
+        return new String[]{IExportDeploymentPlanDataModelProperties.COMPONENT_NAME, IExportDeploymentPlanDataModelProperties.PROJECT_NAME};
+    }
+
+}

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanOperation.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanOperation.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanOperation.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/ExportDeploymentPlanOperation.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,129 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed 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.core.operations;
+
+import org.apache.geronimo.core.internal.GeronimoUtils;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
+import org.eclipse.jst.j2ee.ejb.componentcore.util.EJBArtifactEdit;
+import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+/**
+ * 
+ * 
+ */
+public class ExportDeploymentPlanOperation extends AbstractDataModelOperation
+        implements IExportDeploymentPlanDataModelProperties {
+
+    /**
+     * 
+     */
+    public ExportDeploymentPlanOperation() {
+        super();
+    }
+
+    /**
+     * @param model
+     */
+    public ExportDeploymentPlanOperation(IDataModel model) {
+        super(model);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor,
+     *      org.eclipse.core.runtime.IAdaptable)
+     */
+    public IStatus execute(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+
+        IProject project = ProjectUtilities
+                .getProject(model
+                        .getStringProperty(IExportDeploymentPlanDataModelProperties.PROJECT_NAME));
+
+        IVirtualComponent component = ComponentCore.createComponent(project,
+                IExportDeploymentPlanDataModelProperties.COMPONENT_NAME);
+
+        if (component.getComponentTypeId().equals(EARArtifactEdit.TYPE_ID)) {
+            IVirtualReference[] refs = component.getReferences();
+            for (int i = 0; i < refs.length; i++) {
+                IVirtualComponent refComp = refs[i].getReferencedComponent();
+                EObject plan = getDeploymentPlanForComponent(refComp);
+                if (plan != null) {
+                    addToGeronimoApplicationPlan(plan, refComp);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    // TODO
+    private void addToGeronimoApplicationPlan(EObject eObject,
+            IVirtualComponent component) {
+    }
+
+    private EObject getDeploymentPlanForComponent(IVirtualComponent comp) {
+        
+        if (comp.getComponentTypeId().equals(EARArtifactEdit.TYPE_ID)) {
+            return GeronimoUtils.getApplicationDeploymentPlan(comp);
+        }
+        
+        if (comp.getComponentTypeId().equals(WebArtifactEdit.TYPE_ID)) {
+            return GeronimoUtils.getWebDeploymentPlan(comp);
+        }
+        
+        if (comp.getComponentTypeId().equals(EJBArtifactEdit.TYPE_ID)) {
+            return GeronimoUtils.getOpenEjbDeploymentPlan(comp);
+        }
+        return null;
+    } 
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor,
+     *      org.eclipse.core.runtime.IAdaptable)
+     */
+    public IStatus redo(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.core.commands.operations.AbstractOperation#undo(org.eclipse.core.runtime.IProgressMonitor,
+     *      org.eclipse.core.runtime.IAdaptable)
+     */
+    public IStatus undo(IProgressMonitor monitor, IAdaptable info)
+            throws ExecutionException {
+        return null;
+    }
+
+}

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/IExportDeploymentPlanDataModelProperties.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/IExportDeploymentPlanDataModelProperties.java?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/IExportDeploymentPlanDataModelProperties.java (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.core/src/org/apache/geronimo/core/operations/IExportDeploymentPlanDataModelProperties.java Wed Sep 14 11:59:30 2005
@@ -0,0 +1,12 @@
+package org.apache.geronimo.core.operations;
+
+
+public interface IExportDeploymentPlanDataModelProperties {
+
+    public static final String PROJECT_NAME = "IExportDeploymentPlanDataModelProperties.PROJECT_NAME";
+
+    public static final String COMPONENT_NAME = "IExportDeploymentPlanDataModelProperties.COMPONENT_NAME";
+
+    public static final String EXPORT_LOCATION = "IExportDeploymentPlanDataModelProperties.EXPORT_LOCATION";
+
+}

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.classpath
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.classpath?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.classpath (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.classpath Wed Sep 14 11:59:30 2005
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.project
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.project?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.project (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/.project Wed Sep 14 11:59:30 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.geronimo.deployment.model</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/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/META-INF/MANIFEST.MF?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/META-INF/MANIFEST.MF (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/META-INF/MANIFEST.MF Wed Sep 14 11:59:30 2005
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Geronimo Deployment Plans Model Plug-in
+Bundle-SymbolicName: org.apache.geronimo.deployment.model; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore.xmi
+Eclipse-AutoStart: true
+Export-Package: org.apache.geronimo.xml.model,
+ org.apache.geronimo.xml.ns.deployment,
+ org.apache.geronimo.xml.ns.deployment.impl,
+ org.apache.geronimo.xml.ns.deployment.util,
+ org.apache.geronimo.xml.ns.j2ee.application,
+ org.apache.geronimo.xml.ns.j2ee.application.impl,
+ org.apache.geronimo.xml.ns.j2ee.application.util,
+ org.apache.geronimo.xml.ns.naming,
+ org.apache.geronimo.xml.ns.naming.impl,
+ org.apache.geronimo.xml.ns.naming.util,
+ org.apache.geronimo.xml.ns.security,
+ org.apache.geronimo.xml.ns.security.impl,
+ org.apache.geronimo.xml.ns.security.util,
+ org.apache.geronimo.xml.ns.web,
+ org.apache.geronimo.xml.ns.web.impl,
+ org.apache.geronimo.xml.ns.web.util,
+ org.openejb.xml.ns.openejb.jar,
+ org.openejb.xml.ns.openejb.jar.impl,
+ org.openejb.xml.ns.openejb.jar.util,
+ org.openejb.xml.ns.pkgen,
+ org.openejb.xml.ns.pkgen.impl,
+ org.openejb.xml.ns.pkgen.util
+Bundle-Activator: org.apache.geronimo.xml.model.GeronimoModelPlugin$Implementation

Added: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/build.properties
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/build.properties?rev=280909&view=auto
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/build.properties (added)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.deployment.model/build.properties Wed Sep 14 11:59:30 2005
@@ -0,0 +1,13 @@
+bin.includes = META-INF/,\
+               plugin.properties,\
+               plugin.xml,\
+               schema/,\
+               .
+src.includes = .classpath,\
+               .project,\
+               build.properties,\
+               build.xml,\
+               emf/
+jars.compile.order = .
+source.. = src/
+output.. = bin/