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 2006/09/06 22:38:42 UTC

svn commit: r440859 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/operations/V11DeploymentPlanCreationOperation.java

Author: sppatel
Date: Wed Sep  6 13:38:42 2006
New Revision: 440859

URL: http://svn.apache.org/viewvc?view=rev&rev=440859
Log:
fix adding sharedlib at project creation

Modified:
    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.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?view=diff&rev=440859&r1=440858&r2=440859
==============================================================================
--- 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 Wed Sep  6 13:38:42 2006
@@ -21,6 +21,7 @@
 import org.apache.geronimo.st.v11.core.GeronimoV11Utils;
 import org.apache.geronimo.xml.ns.deployment.ArtifactType;
 import org.apache.geronimo.xml.ns.deployment.DependenciesType;
+import org.apache.geronimo.xml.ns.deployment.DependencyType;
 import org.apache.geronimo.xml.ns.deployment.DeploymentFactory;
 import org.apache.geronimo.xml.ns.deployment.DeploymentPackage;
 import org.apache.geronimo.xml.ns.deployment.DocumentRoot;
@@ -218,7 +219,7 @@
 		
 		if(cfg != null && cfg.isSharedLib()) {
 			DependenciesType dt = DeploymentFactory.eINSTANCE.createDependenciesType();
-			ArtifactType sharedLib = createArtifactType("geronimo", "sharedLib", "1.1", "car");
+			ArtifactType sharedLib = createDependencyType("geronimo", "sharedLib", "1.1", "car");
 			dt.getDependency().add(sharedLib);
 			env.setDependencies(dt);
 		}
@@ -228,6 +229,15 @@
 	
 	private ArtifactType createArtifactType(String groupId, String artifactId, String version, String type) {
 		ArtifactType artifact = DeploymentFactory.eINSTANCE.createArtifactType();
+		artifact.setGroupId(groupId);
+		artifact.setArtifactId(artifactId);
+		artifact.setVersion(version);
+		artifact.setType(type);
+		return artifact;
+	}
+	
+	private ArtifactType createDependencyType(String groupId, String artifactId, String version, String type) {
+		DependencyType artifact = DeploymentFactory.eINSTANCE.createDependencyType();
 		artifact.setGroupId(groupId);
 		artifact.setArtifactId(artifactId);
 		artifact.setVersion(version);