Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 5179 invoked from network); 12 Sep 2006 16:20:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 16:20:17 -0000 Received: (qmail 22230 invoked by uid 500); 12 Sep 2006 16:20:16 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 22200 invoked by uid 500); 12 Sep 2006 16:20:16 -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 22189 invoked by uid 99); 12 Sep 2006 16:20:16 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2006 09:20:16 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=sppatel@apache.org; spf=permerror X-ASF-Spam-Status: No, hits=-9.8 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received-SPF: error (idunn.apache.osuosl.org: domain apache.org from 140.211.166.113 cause and error) Received: from ([140.211.166.113:58769] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 9C/10-03395-D4ED6054 for ; Tue, 12 Sep 2006 09:20:29 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 2D2551A981A; Tue, 12 Sep 2006 09:20:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r442633 - in /geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools: DownloadMojo.java InstallPluginDependenciesMojo.java Date: Tue, 12 Sep 2006 16:20:12 -0000 To: scm@geronimo.apache.org From: sppatel@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060912162013.2D2551A981A@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sppatel Date: Tue Sep 12 09:20:11 2006 New Revision: 442633 URL: http://svn.apache.org/viewvc?view=rev&rev=442633 Log: GERONIMODEVTOOLS-92 support builds on additional platforms Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/DownloadMojo.java geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/DownloadMojo.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/DownloadMojo.java?view=diff&rev=442633&r1=442632&r2=442633 ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/DownloadMojo.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/DownloadMojo.java Tue Sep 12 09:20:11 2006 @@ -72,7 +72,7 @@ * @parameter expression="${settings.localRepository}/eclipse/install.props" */ private File propsFile; - + /** * @parameter expression="${overwrite}"; */ @@ -92,7 +92,7 @@ /* * (non-Javadoc) - * + * * @see org.apache.maven.plugin.Mojo#execute() */ public void execute() throws MojoExecutionException, MojoFailureException { @@ -133,8 +133,8 @@ load(); int identifier = generateInstallIdentifier(images); - - + + boolean extract = false; if("false".equals(overwrite)) { extract = false; @@ -143,7 +143,7 @@ } else { extract = shouldExtract(identifier); } - + if (extract) { clean(); Iterator i = images.iterator(); @@ -176,14 +176,31 @@ private String getPlatformUrlSuffix() { String os = System.getProperty("os.name"); + String arch = System.getProperty("os.arch"); + getLog().info("SDKPlatform: os.name=" + os + ", os.arch=" + arch); if (os.startsWith("Windows")) { - return "win32.zip"; + if (arch.equalsIgnoreCase("x86_64") || arch.equalsIgnoreCase("amd64")) + return "win32-x86_64.zip"; + else + return "win32.zip"; } else if (os.startsWith("Linux")) { - return "linux-gtk.tar.gz"; + if (arch.equalsIgnoreCase("x86_64") || arch.equalsIgnoreCase("amd64")) + return "linux-gtk-x86_64.tar.gz"; + else if (arch.startsWith("ppc")) + return "linux-gtk-ppc.tar.gz"; + else + return "linux-gtk.tar.gz"; } else if (os.startsWith("Mac")) { return "macosx-carbon.tar.gz"; - } - return "win32.zip"; + } else if (os.startsWith("SunOS")) { + if (arch.startsWith("x86") || arch.startsWith("amd")) + return "solaris-gtk-x86.zip"; + else + return "solaris-gtk.zip"; + } else if (os.startsWith("AIX")) { + return "aix-motif.zip"; + } else // flag that we don't know which Eclipse SDK to use + return "unknown.zip"; } private File getRepositoryDestination(URL url) { Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java?view=diff&rev=442633&r1=442632&r2=442633 ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java Tue Sep 12 09:20:11 2006 @@ -1,13 +1,13 @@ /** * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as * applicable - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -42,14 +42,14 @@ /** * This maven plugin installs to the local maven repository eclipse plugin * dependencies for a pom from an eclipse distribution. - * + * * Plugins dependencies are defined with the "org.eclipse.plugins" groupId. - * + * * The artifactId is the bundle id. If the bundle is a directory, then all jars * inside the bundle will be installed. The bundle id can be appendend with "." + * the name of the jar inside the bundle, excluding the ".jar" extension in * order to explicitly define a jar dependency. - * + * * @goal install */ public class InstallPluginDependenciesMojo extends AbstractMojo { @@ -104,7 +104,7 @@ /* * (non-Javadoc) - * + * * @see org.apache.maven.plugin.Mojo#execute() */ public void execute() throws MojoExecutionException, MojoFailureException { @@ -156,13 +156,27 @@ fragment.setVersion(swtDependency.getVersion()); String id = swtDependency.getArtifactId(); String platform = System.getProperty("os.name"); + String arch = System.getProperty("os.arch"); if (platform.startsWith("Windows")) { - fragment.setArtifactId(id.concat(".win32.win32.x86")); + fragment.setArtifactId(id.concat(".win32.win32.x86")); } else if (platform.startsWith("Linux")) { - fragment.setArtifactId(id.concat(".gtk.linux.x86")); + if (arch.equalsIgnoreCase("x86_64") || arch.equalsIgnoreCase("amd64")) + fragment.setArtifactId(id.concat(".gtk.linux.x86_64")); + else if (arch.startsWith("ppc")) + fragment.setArtifactId(id.concat(".gtk.linux.ppc")); + else + fragment.setArtifactId(id.concat(".gtk.linux.x86")); } else if (platform.startsWith("Mac")) { fragment.setArtifactId(id.concat(".carbon.macosx")); + } else if (platform.startsWith("SunOS")) { + if (arch.startsWith("x86") || arch.startsWith("amd")) + fragment.setArtifactId(id.concat(".gtk.solaris.x86")); + else + fragment.setArtifactId(id.concat(".gtk.solaris.sparc")); + } else if (platform.startsWith("AIX")) { + fragment.setArtifactId(id.concat(".motif.aix.ppc")); } + getLog().info("SWTFragment: " + fragment.toString()); return fragment; } @@ -225,11 +239,11 @@ /** * Converts eclipse qualifier convention to maven convention. - * + * * major.minor.revision.qualifier is converted to major.minor.revision-build * where build is the eclipse qualifier with all non-numeric characters * removed. - * + * * @param version * @return */