geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r384224 - in /geronimo/devtools/eclipse-plugin/trunk: maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/XSDImporterMojo.java plugins/org.apache.geronimo.deployment.model/pom.xml pom.xml
Date Wed, 08 Mar 2006 14:42:00 GMT
Author: sppatel
Date: Wed Mar  8 06:41:58 2006
New Revision: 384224

URL: http://svn.apache.org/viewcvs?rev=384224&view=rev
Log:
allow genmodel reload and multiple schemas

Modified:
    geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/XSDImporterMojo.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.model/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/pom.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/XSDImporterMojo.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/XSDImporterMojo.java?rev=384224&r1=384223&r2=384224&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/XSDImporterMojo.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/XSDImporterMojo.java
Wed Mar  8 06:41:58 2006
@@ -27,34 +27,39 @@
 public class XSDImporterMojo extends LaunchOSGIMojo {
 
 	public static final String APPLICATION_ID = "org.eclipse.xsd.ecore.importer.XSD2GenModel";
-
+	
 	/**
 	 * @parameter
+	 * @required
 	 */
-	protected Map packagemap;
-
+	protected File[] schemas;
+	
 	/**
 	 * @parameter
+	 * @required
 	 */
-	protected String[] packages;
-
+	protected File genmodel;
+	
 	/**
 	 * @parameter
 	 * @required
 	 */
-	protected File schema;
+	protected String type;
 
 	/**
 	 * @parameter
-	 * @required
 	 */
-	protected File genmodel;
-
+	protected String[] packages;
+	
 	/**
 	 * @parameter
-	 * @required
 	 */
-	protected String type;
+	protected Map packagemap;
+	
+	/**
+	 * @paramter expression="false"
+	 */
+	protected boolean reload;
 
 	public static final String SPACE = " ";
 
@@ -86,8 +91,15 @@
 
 	protected StringBuffer processParameters() {
 		StringBuffer buffer = new StringBuffer();
-		buffer.append(schema.getAbsolutePath() + SPACE);
-		buffer.append(genmodel.getAbsolutePath() + SPACE);
+		
+		for(int i = 0; i < schemas.length; i++) {
+			buffer.append(schemas[i].getAbsolutePath()).append(SPACE);
+		}
+	
+		buffer.append(genmodel.getAbsolutePath()).append(SPACE);
+		if(reload)
+			buffer.append("-reload").append(SPACE);
+		
 		if ("model".equals(type)) {
 			buffer.append("-modelProject");
 		} else if ("edit".equals(type)) {
@@ -96,22 +108,22 @@
 			buffer.append("-editorProject");
 		}
 		buffer.append(SPACE);
-		buffer.append(project.getBasedir() + SPACE);
-		buffer.append(getRelativeSrcDir() + SPACE);
+		buffer.append(project.getBasedir()).append(SPACE);
+		buffer.append(getRelativeSrcDir()).append(SPACE);
 		if (packages != null) {
-			buffer.append("-packages" + SPACE);
+			buffer.append("-packages").append(SPACE);
 			for (int i = 0; i < packages.length; i++) {
-				buffer.append(packages[i] + SPACE);
+				buffer.append(packages[i]).append(SPACE);
 			}
 		}
 
 		if (packagemap != null) {
-			buffer.append("-packagemap" + SPACE);
+			buffer.append("-packagemap").append(SPACE);
 			Set keys = packagemap.keySet();
 			for (Iterator i = keys.iterator(); i.hasNext();) {
 				String mapping = (String) i.next(); // org.apache...
 				String pkg = (String) packagemap.get(mapping); // http://...
-				buffer.append(pkg + SPACE + mapping + SPACE);
+				buffer.append(pkg).append(SPACE).append(mapping).append(SPACE);
 			}
 		}
 		return buffer;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.model/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.model/pom.xml?rev=384224&r1=384223&r2=384224&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.model/pom.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.deployment.model/pom.xml
Wed Mar  8 06:41:58 2006
@@ -24,8 +24,64 @@
         </includes>
       </resource>
     </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.geronimo.devtools</groupId>
+        <artifactId>maven-emf-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>execution-web</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>xsd2java</goal>
+            </goals>
+            <configuration>
+              <schemas>
+                <schema>geronimo-web-1.0.xsd</schema>
+              </schemas>
+              <genmodel>geronimo-web.genmodel</genmodel>
+              <type>model</type>
+              <packages>
+                <package>http://geronimo.apache.org/xml/ns/naming-1.0</package>
+                <package>http://geronimo.apache.org/xml/ns/security-1.1</package>
+                <package>http://geronimo.apache.org/xml/ns/deployment-1.0</package>
+                <package>http://geronimo.apache.org/xml/ns/j2ee/web-1.0</package>
+              </packages>
+              <packagemap>
+                <org.apache.geronimo.xml.ns.naming>http://geronimo.apache.org/xml/ns/naming-1.0</org.apache.geronimo.xml.ns.naming>

+                <org.apache.geronimo.xml.ns.security>http://geronimo.apache.org/xml/ns/security-1.1</org.apache.geronimo.xml.ns.security>

+                <org.apache.geronimo.xml.ns.deployment>http://geronimo.apache.org/xml/ns/deployment-1.0</org.apache.geronimo.xml.ns.deployment>

+                <org.apache.geronimo.xml.ns.j2ee.web>http://geronimo.apache.org/xml/ns/j2ee/web-1.0</org.apache.geronimo.xml.ns.j2ee.web>
   
+              </packagemap>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
   </build>
   <dependencies>
+    <!-- Dependencies for Crimson DOM Bug Workaround -->
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xercesImpl</artifactId>
+      <version>${xercesImpl_version}</version>      
+    </dependency>
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xmlParserAPIs</artifactId>
+      <version>${xmlParserAPIs_version}</version>      
+    </dependency>
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xerces</artifactId>
+      <version>${xerces_version}</version>      
+    </dependency>
+    <dependency>
+      <groupId>xml-resolver</groupId>
+      <artifactId>xml-resolver</artifactId>
+      <version>${xml_resolver_version}</version>      
+    </dependency>
+    <!-- Eclipse Plugin Dependencies -->
     <dependency>
       <groupId>org.eclipse.plugins</groupId>
       <artifactId>org.eclipse.osgi</artifactId>

Modified: geronimo/devtools/eclipse-plugin/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/pom.xml?rev=384224&r1=384223&r2=384224&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/pom.xml Wed Mar  8 06:41:58 2006
@@ -115,7 +115,7 @@
     <ant_apache_oro_version>1.6.4</ant_apache_oro_version>
     <ant_optional_version>1.5.3-1</ant_optional_version>
     <xercesImpl_version>2.5.0</xercesImpl_version>
-    <xmlParsersAPIs_version>2.6.2</xmlParsersAPIs_version>
+    <xmlParserAPIs_version>2.6.2</xmlParserAPIs_version>
     <xerces_version>2.4.0</xerces_version>
     <xml_resolver_version>1.1</xml_resolver_version>
     <xbean_version>2.0.0</xbean_version>
@@ -200,7 +200,7 @@
 
   <build>
     <defaultGoal>install</defaultGoal>
-    <sourceDirectory>src/java</sourceDirectory>
+    <sourceDirectory>src/</sourceDirectory>
     <plugins>
       <plugin>
         <groupId>org.apache.geronimo.devtools</groupId>



Mime
View raw message