Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 66928 invoked from network); 2 Oct 2008 20:22:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2008 20:22:30 -0000 Received: (qmail 51140 invoked by uid 500); 2 Oct 2008 20:22:29 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 51099 invoked by uid 500); 2 Oct 2008 20:22:29 -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 51090 invoked by uid 99); 2 Oct 2008 20:22:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 13:22:29 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Oct 2008 20:21:35 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D170F23889F1; Thu, 2 Oct 2008 13:21:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r701233 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java Date: Thu, 02 Oct 2008 20:21:39 -0000 To: scm@geronimo.apache.org From: linsun@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081002202139.D170F23889F1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: linsun Date: Thu Oct 2 13:21:39 2008 New Revision: 701233 URL: http://svn.apache.org/viewvc?rev=701233&view=rev Log: GERONIMO-4319 - All plugin groups are shown as installable from the install plugin portlet Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?rev=701233&r1=701232&r2=701233&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java Thu Oct 2 13:21:39 2008 @@ -980,18 +980,28 @@ // 1. Check that it's not already installed if (metadata.getModuleId() != null) { // that is, it's a real configuration not a plugin list Artifact artifact = toArtifact(metadata.getModuleId()); - if (configManager.isInstalled(artifact)) { - boolean upgrade = false; - for (ArtifactType obsolete : metadata.getObsoletes()) { - Artifact test = toArtifact(obsolete); - if (test.matches(artifact)) { - upgrade = true; - break; + + //plugin groups don't get registered with configManager + if (plugin.isPluginGroup() != null && plugin.isPluginGroup()) { + if (installedArtifacts.contains(artifact)) { + log.debug("Configuration {} is already installed", artifact); + return false; + } + } else { + if (configManager.isInstalled(artifact)) { + boolean upgrade = false; + for (ArtifactType obsolete : metadata.getObsoletes()) { + Artifact test = toArtifact(obsolete); + if (test.matches(artifact)) { + upgrade = true; + break; + } + } + if (!upgrade && installedArtifacts.contains(artifact)) { + log.debug("Configuration {} is already installed", artifact); + return false; } } - if (!upgrade && installedArtifacts.contains(artifact)) { - log.debug("Configuration {} is already installed", artifact); - return false; } } } @@ -1630,6 +1640,7 @@ PluginType copy = new PluginType(); copy.setAuthor(metadata.getAuthor()); copy.setCategory(metadata.getCategory()); + copy.setPluginGroup(metadata.isPluginGroup() == null ? false : metadata.isPluginGroup()); copy.setDescription(metadata.getDescription()); copy.setName(metadata.getName()); copy.setUrl(metadata.getUrl());