geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r417199 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/ org.apache.geron...
Date Mon, 26 Jun 2006 14:29:41 GMT
Author: sppatel
Date: Mon Jun 26 07:29:40 2006
New Revision: 417199

URL: http://svn.apache.org/viewvc?rev=417199&view=rev
Log:
fix can't deploy service modules

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoUtils.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/serverdef/geronimo11.serverdef
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/plugin.xml?rev=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/plugin.xml
Mon Jun 26 07:29:40 2006
@@ -34,6 +34,7 @@
             <facet id="jst.ear" version="1.2,1.3,1.4"/>
             <facet id="jst.connector" version="1.0,1.5"/>
             <facet id="jst.appclient" version="1.2,1.3,1.4"/>
+            <facet id="jst.utility" version="1.0"/>
         </supported>
         
     </extension>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoUtils.java?rev=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoUtils.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoUtils.java
Mon Jun 26 07:29:40 2006
@@ -45,6 +45,8 @@
 	public static final String APP_PLAN_NAME = "geronimo-application.xml";
 
 	public static final String CONNECTOR_PLAN_NAME = "geronimo-connector.xml";
+	
+	public static final String SERVICE_PLAN_NAME = "geronimo-service.xml";
 
 	public static boolean isWebModule(IModule module) {
 		return "jst.web".equals(module.getModuleType().getId());
@@ -61,6 +63,10 @@
 	public static boolean isRARModule(IModule module) {
 		return "jst.connnector".equals(module.getModuleType().getId());
 	}
+	
+	public static boolean isUtilityModule(IModule module) {
+		return "jst.utility".equals(module.getModuleType().getId());
+	}
 
 	public static ModuleType getJSR88ModuleType(IModule module) {
 		if (isWebModule(module)) {
@@ -94,6 +100,11 @@
 
 	public static IFile getConnectorDeploymentPlanFile(IVirtualComponent comp) {
 		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(CONNECTOR_PLAN_NAME);
+		return comp.getProject().getFile(deployPlanPath);
+	}
+	
+	public static IFile getServiceDeploymentPlanFile(IVirtualComponent comp) {
+		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(SERVICE_PLAN_NAME);
 		return comp.getProject().getFile(deployPlanPath);
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/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/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java?rev=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/DeploymentPlanCreationOperation.java
Mon Jun 26 07:29:40 2006
@@ -20,10 +20,12 @@
 
 import org.apache.geronimo.st.core.GeronimoUtils;
 import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
 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.ecore.EObject;
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.xmi.XMLResource;
 import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
@@ -68,6 +70,8 @@
 			createGeronimoApplicationDeploymentPlan(GeronimoUtils.getApplicationDeploymentPlanFile(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));
 		}
 	}
 
@@ -82,5 +86,25 @@
 		} catch (IOException e) {
 			e.printStackTrace();
 		}
+	}
+	
+	public EObject createOpenEjbDeploymentPlan(IFile file) {
+		return null;
+	}
+
+	public EObject createGeronimoWebDeploymentPlan(IFile file) {
+		return null;
+	}
+
+	public EObject createGeronimoApplicationDeploymentPlan(IFile file) {
+		return null;
+	}
+
+	public EObject createConnectorDeploymentPlan(IFile file) {
+		return null;
+	}
+	
+	public EObject createServiceDeploymentPlan(IFile file) {
+		return null;
 	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/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/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java?rev=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/IDeploymentPlanCreationOp.java
Mon Jun 26 07:29:40 2006
@@ -27,5 +27,7 @@
 	public EObject createGeronimoApplicationDeploymentPlan(IFile file);
 
 	public EObject createConnectorDeploymentPlan(IFile file);
+	
+	public EObject createServiceDeploymentPlan(IFile file);
 
 }

Modified: 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=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/plugin.xml
Mon Jun 26 07:29:40 2006
@@ -10,6 +10,7 @@
             <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>
     
@@ -78,6 +79,7 @@
                     <requires facet="jst.web" version="2.2"/>
                     <requires facet="jst.web" version="2.3"/>
                     <requires facet="jst.web" version="2.4"/>
+                    <requires facet="jst.utility" version="1.0"/>
                 </or>
             </constraint>
         </project-facet-version>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/serverdef/geronimo11.serverdef
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/serverdef/geronimo11.serverdef?rev=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/serverdef/geronimo11.serverdef
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/serverdef/geronimo11.serverdef
Mon Jun 26 07:29:40 2006
@@ -64,6 +64,9 @@
     <module>
 		<type>jst.ear</type>
 	</module>
+	<module>
+		<type>jst.utility</type>
+	</module>
 
 	<project>
 		<classpathReference>geronimo.project</classpathReference>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.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/operations/V11DeploymentPlanCreationOperation.java?rev=417199&r1=417198&r2=417199&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java
Mon Jun 26 07:29:40 2006
@@ -22,7 +22,11 @@
 import org.apache.geronimo.xml.ns.deployment.ArtifactType;
 import org.apache.geronimo.xml.ns.deployment.DependenciesType;
 import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
+import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
+import org.apache.geronimo.xml.ns.deployment.DocumentRoot;
 import org.apache.geronimo.xml.ns.deployment.EnvironmentType;
+import org.apache.geronimo.xml.ns.deployment.ModuleType;
+import org.apache.geronimo.xml.ns.deployment.util.DeploymentResourceFactoryImpl;
 import org.apache.geronimo.xml.ns.j2ee.application.ApplicationFactory;
 import org.apache.geronimo.xml.ns.j2ee.application.ApplicationPackage;
 import org.apache.geronimo.xml.ns.j2ee.application.ApplicationType;
@@ -169,6 +173,28 @@
 
 		root.setEnvironment(getConfigEnvironment());
 		documentRoot.setConnector(root);
+		resource.getContents().add(documentRoot);
+
+		save(resource);
+
+		return root;
+	}
+	
+	public EObject createServiceDeploymentPlan(IFile dpFile) {
+		URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString());
+
+		ResourceSet resourceSet = new ResourceSetImpl();
+		GeronimoV11Utils.register(resourceSet, new DeploymentResourceFactoryImpl(), DeploymentPackage.eINSTANCE,
DeploymentPackage.eNS_URI);
+
+		Resource resource = resourceSet.createResource(uri);
+		DocumentRoot documentRoot = DeploymentFactory.eINSTANCE.createDocumentRoot();
+		ModuleType root = DeploymentFactory.eINSTANCE.createModuleType();
+
+		EMap map = documentRoot.getXMLNSPrefixMap();
+		map.put("sys", GeronimoSchemaNS.GERONIMO_DEPLOYMENT_NS_1_1);
+
+		root.setEnvironment(getConfigEnvironment());
+		documentRoot.setModule(root);
 		resource.getContents().add(documentRoot);
 
 		save(resource);



Mime
View raw message