geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r385381 - in /geronimo/devtools/eclipse-plugin/trunk: geronimo-emf-common/ maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/
Date Sun, 12 Mar 2006 22:57:32 GMT
Author: sppatel
Date: Sun Mar 12 14:57:32 2006
New Revision: 385381

URL: http://svn.apache.org/viewcvs?rev=385381&view=rev
Log:
m2 plugin configuration, eclipse bug workaround

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

Modified: geronimo/devtools/eclipse-plugin/trunk/geronimo-emf-common/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/geronimo-emf-common/pom.xml?rev=385381&r1=385380&r2=385381&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/geronimo-emf-common/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/geronimo-emf-common/pom.xml Sun Mar 12 14:57:32
2006
@@ -38,6 +38,15 @@
           <editProject>${project.build.directory}/org.apache.geronimo.deployment.model.edit</editProject>
           <src>src</src>
           <reload>true</reload>
+          <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.application>http://geronimo.apache.org/xml/ns/j2ee/application-1.0</org.apache.geronimo.xml.ns.j2ee.application>
+            <org.apache.geronimo.xml.ns.j2ee.web>http://geronimo.apache.org/xml/ns/j2ee/web-1.0</org.apache.geronimo.xml.ns.j2ee.web>
     
+            <org.openejb.xml.ns.openejb.jar>http://www.openejb.org/xml/ns/openejb-jar-2.0</org.openejb.xml.ns.openejb.jar>
  
+            <org.openejb.xml.ns.pkgen>http://www.openejb.org/xml/ns/pkgen-2.0</org.openejb.xml.ns.pkgen>
+          </packagemap>
         </configuration>
         <executions>
           <execution>
@@ -57,12 +66,71 @@
                 <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>
+          <execution>
+            <id>execution-application</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>xsd2genmodel</goal>
+            </goals>
+            <configuration>
+              <schemas>
+                <schema>${project.build.directory}/schemas/geronimo-application-1.0.xsd</schema>
+              </schemas>
+              <genmodel>${project.build.outputDirectory}/emf/geronimo-application.genmodel</genmodel>
+              <packages>
+                <package>http://geronimo.apache.org/xml/ns/j2ee/application-1.0</package>
+              </packages>
+            </configuration>
+          </execution>
+          <execution>
+            <id>execution-openejb</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>xsd2genmodel</goal>
+            </goals>
+            <configuration>
+              <schemas>
+                <schema>${project.build.directory}/schemas/openejb-jar-2.0.xsd</schema>
+              </schemas>
+              <genmodel>${project.build.outputDirectory}/emf/openejb-jar.genmodel</genmodel>
+              <packages>
+                <package>http://www.openejb.org/xml/ns/openejb-jar-2.0</package>
+                <package>http://www.openejb.org/xml/ns/pkgen-2.0</package>
+              </packages>
+            </configuration>
+          </execution>
+          <execution>
+            <id>execution-connector</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>xsd2genmodel</goal>
+            </goals>
+            <configuration>
+              <schemas>
+                <schema>${project.build.directory}/schemas/geronimo-connector-1.0.xsd</schema>
+              </schemas>
+              <genmodel>${project.build.outputDirectory}/emf/geronimo-connector.genmodel</genmodel>
+              <packages>
+                <package>http://geronimo.apache.org/xml/ns/j2ee/connector-1.0</package>
+              </packages>
+            </configuration>
+          </execution>
+          <execution>
+            <id>execution-appclient</id>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>xsd2genmodel</goal>
+            </goals>
+            <configuration>
+              <schemas>
+                <schema>${project.build.directory}/schemas/geronimo-application-client-1.0.xsd</schema>
+              </schemas>
+              <genmodel>${project.build.outputDirectory}/emf/geronimo-application-client.genmodel</genmodel>
+              <packages>
+                <package>http://geronimo.apache.org/xml/ns/j2ee/application-client-1.0</package>
+              </packages>
             </configuration>
           </execution>
         </executions>

Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/LaunchOSGIMojo.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/LaunchOSGIMojo.java?rev=385381&r1=385380&r2=385381&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/LaunchOSGIMojo.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-emf-plugin/src/main/java/org/apache/emf/plugin/LaunchOSGIMojo.java
Sun Mar 12 14:57:32 2006
@@ -20,6 +20,7 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Arrays;
+import java.util.StringTokenizer;
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -34,7 +35,7 @@
 	 * @parameter expression="${settings.localRepository}/eclipse/eclipse"
 	 */
 	protected File eclipseHome;
-	
+
 	/**
 	 * @parameter expression="${project.basedir}"
 	 */
@@ -45,6 +46,8 @@
 	 */
 	protected MavenProject mavenProject;
 
+	protected static final String SPACE = " ";
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -62,21 +65,31 @@
 
 		if (getLog().isDebugEnabled())
 			System.setProperty(EclipseStarter.PROP_CONSOLE_LOG, "true");
-		
+
 		System.setProperty(EclipseStarter.PROP_CLEAN, "true");
 		System.setProperty(EclipseStarter.PROP_INSTALL_AREA, eclipseHome.getAbsolutePath());
 		System.setProperty(EclipseStarter.PROP_FRAMEWORK, osgi.toExternalForm());
 		System.setProperty(LocationManager.PROP_INSTANCE_AREA, workspace.getAbsolutePath());
 		System.setProperty("eclipse.application", getApplicationID());
 
+		validate();
+
 		String[] args = getArguments();
 		if (args == null)
 			args = new String[] {};
 
 		getLog().debug(Arrays.asList(args).toString());
-
+		
 		try {
-			EclipseStarter.run(args, null);
+			//workaround for bugzilla 107909
+			System.setProperty(EclipseStarter.PROP_NOSHUTDOWN, "true"); 
+			EclipseStarter.run(args);
+		} catch (IllegalStateException e) {
+			try {
+				EclipseStarter.run(args, null);
+			} catch (Exception e1) {
+				throw new MojoFailureException(e.getMessage());
+			}
 		} catch (Exception e) {
 			throw new MojoFailureException(e.getMessage());
 		}
@@ -103,5 +116,18 @@
 				}
 		}
 		return null;
+	}
+
+	public static String[] getArguments(StringBuffer buffer) {
+		StringTokenizer st = new StringTokenizer(buffer.toString());
+		String[] args = new String[st.countTokens()];
+		for (int i = 0; st.hasMoreTokens(); i++) {
+			args[i] = st.nextToken();
+		}
+		return args;
+	}
+
+	protected void validate() throws MojoFailureException {
+
 	}
 }

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=385381&r1=385380&r2=385381&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
Sun Mar 12 14:57:32 2006
@@ -19,13 +19,11 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.StringTokenizer;
 
 import org.apache.maven.artifact.Artifact;
 
 /**
  * @goal xsd2genmodel
- * @requiresDependencyResolution
  */
 public class XSDImporterMojo extends LaunchOSGIMojo {
 
@@ -78,10 +76,8 @@
 	 * @paramter expression="false"
 	 */
 	protected boolean reload;
-	
-	protected Artifact[] vmargs;
 
-	public static final String SPACE = " ";
+	protected Artifact[] vmargs;
 
 	/*
 	 * (non-Javadoc)
@@ -89,14 +85,7 @@
 	 * @see org.apache.emf.plugin.LaunchOSGIMojo#getArguments()
 	 */
 	protected String[] getArguments() {
-		String params = processParameters().toString();
-		StringTokenizer st = new StringTokenizer(params);
-		String[] args = new String[st.countTokens()];
-		int i = 0;
-		while (st.hasMoreTokens()) {
-			args[i++] = st.nextToken();
-		}
-		return args;
+		return getArguments(processParameters());
 	}
 
 	/*



Mime
View raw message