geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1061606 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/facets/DeploymentPlanCreationOperation.java
Date Fri, 21 Jan 2011 03:02:13 GMT
Author: hanhongfang
Date: Fri Jan 21 03:02:12 2011
New Revision: 1061606

URL: http://svn.apache.org/viewvc?rev=1061606&view=rev
Log:
GERONIMODEVTOOLS-698 Context root specified while creating a dynamic web project is not respected

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/facets/DeploymentPlanCreationOperation.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/facets/DeploymentPlanCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/facets/DeploymentPlanCreationOperation.java?rev=1061606&r1=1061605&r2=1061606&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/facets/DeploymentPlanCreationOperation.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/facets/DeploymentPlanCreationOperation.java
Fri Jan 21 03:02:12 2011
@@ -23,8 +23,8 @@ import org.apache.geronimo.jee.applicati
 import org.apache.geronimo.jee.connector.Connector;
 import org.apache.geronimo.jee.connector.Resourceadapter;
 import org.apache.geronimo.jee.deployment.Artifact;
-import org.apache.geronimo.jee.deployment.Dependency;
 import org.apache.geronimo.jee.deployment.Dependencies;
+import org.apache.geronimo.jee.deployment.Dependency;
 import org.apache.geronimo.jee.deployment.Environment;
 import org.apache.geronimo.jee.openejb.OpenejbJar;
 import org.apache.geronimo.jee.web.WebApp;
@@ -45,6 +45,9 @@ import org.eclipse.wst.common.componentc
 import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
 import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.model.IURLProvider;
 
 
 /**
@@ -153,9 +156,11 @@ public class DeploymentPlanCreationOpera
         org.apache.geronimo.jee.web.ObjectFactory webFactory = new org.apache.geronimo.jee.web.ObjectFactory();
         WebApp web = webFactory.createWebApp();
 
-        web.setContextRoot("/" + getProject().getName());
+        IVirtualComponent c = ComponentCore.createComponent(getProject());
+        String contextRoot = (String) c.getMetaProperties().get("context-root");
+        web.setContextRoot("/" + contextRoot);
         web.setEnvironment(getConfigEnvironment());
-
+        
         JAXBElement jaxbElement = webFactory.createWebApp(web);
         JAXBUtils.marshalDeploymentPlan(jaxbElement, dpFile);
 



Mime
View raw message