Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 84447 invoked from network); 12 Mar 2006 22:57:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Mar 2006 22:57:56 -0000 Received: (qmail 25987 invoked by uid 500); 12 Mar 2006 22:57:55 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 25949 invoked by uid 500); 12 Mar 2006 22:57:55 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 25938 invoked by uid 99); 12 Mar 2006 22:57:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Mar 2006 14:57:55 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 12 Mar 2006 14:57:54 -0800 Received: (qmail 84304 invoked by uid 65534); 12 Mar 2006 22:57:33 -0000 Message-ID: <20060312225733.84301.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: sppatel@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 @@ ${project.build.directory}/org.apache.geronimo.deployment.model.edit src true + + http://geronimo.apache.org/xml/ns/naming-1.0 + http://geronimo.apache.org/xml/ns/security-1.1 + http://geronimo.apache.org/xml/ns/deployment-1.0 + http://geronimo.apache.org/xml/ns/j2ee/application-1.0 + http://geronimo.apache.org/xml/ns/j2ee/web-1.0 + http://www.openejb.org/xml/ns/openejb-jar-2.0 + http://www.openejb.org/xml/ns/pkgen-2.0 + @@ -57,12 +66,71 @@ http://geronimo.apache.org/xml/ns/deployment-1.0 http://geronimo.apache.org/xml/ns/j2ee/web-1.0 - - http://geronimo.apache.org/xml/ns/naming-1.0 - http://geronimo.apache.org/xml/ns/security-1.1 - http://geronimo.apache.org/xml/ns/deployment-1.0 - http://geronimo.apache.org/xml/ns/j2ee/web-1.0 - + + + + execution-application + generate-resources + + xsd2genmodel + + + + ${project.build.directory}/schemas/geronimo-application-1.0.xsd + + ${project.build.outputDirectory}/emf/geronimo-application.genmodel + + http://geronimo.apache.org/xml/ns/j2ee/application-1.0 + + + + + execution-openejb + generate-resources + + xsd2genmodel + + + + ${project.build.directory}/schemas/openejb-jar-2.0.xsd + + ${project.build.outputDirectory}/emf/openejb-jar.genmodel + + http://www.openejb.org/xml/ns/openejb-jar-2.0 + http://www.openejb.org/xml/ns/pkgen-2.0 + + + + + execution-connector + generate-resources + + xsd2genmodel + + + + ${project.build.directory}/schemas/geronimo-connector-1.0.xsd + + ${project.build.outputDirectory}/emf/geronimo-connector.genmodel + + http://geronimo.apache.org/xml/ns/j2ee/connector-1.0 + + + + + execution-appclient + generate-resources + + xsd2genmodel + + + + ${project.build.directory}/schemas/geronimo-application-client-1.0.xsd + + ${project.build.outputDirectory}/emf/geronimo-application-client.genmodel + + http://geronimo.apache.org/xml/ns/j2ee/application-client-1.0 + 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()); } /*