Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 34237 invoked from network); 21 Feb 2007 15:02:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2007 15:02:08 -0000 Received: (qmail 59321 invoked by uid 500); 21 Feb 2007 15:01:35 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 59298 invoked by uid 500); 21 Feb 2007 15:01:35 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 59208 invoked by uid 99); 21 Feb 2007 15:01:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 07:01:35 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2007 07:01:25 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id C49AD1A981A; Wed, 21 Feb 2007 07:01:04 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r510046 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ProjectGroupAction.java resources/localization/Continuum.properties resources/xwork.xml webapp/WEB-INF/jsp/projectGroupSummary.jsp Date: Wed, 21 Feb 2007 15:01:03 -0000 To: continuum-commits@maven.apache.org From: evenisse@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070221150104.C49AD1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: evenisse Date: Wed Feb 21 07:01:01 2007 New Revision: 510046 URL: http://svn.apache.org/viewvc?view=rev&rev=510046 Log: o Fix NPE when user try to release an empty group o Print release error messages instead of exception Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?view=diff&rev=510046&r1=510045&r2=510046 ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java (original) +++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java Wed Feb 21 07:01:01 2007 @@ -398,13 +398,19 @@ { //currently, we have no provisions for releasing 2 or more parents //at the same time, this will be implemented in the future - throw new ContinuumException( - "Cannot release two or more parent projects in the same project group at the same time." ); + addActionError( "projectGroup.release.error.severalParentProjects" ); + return INPUT; } } } } + if ( parent == null ) + { + addActionError( "projectGroup.release.error.emptyGroup" ); + return INPUT; + } + releaseProjectId = parent.getId(); if ( allBuildsOk ) @@ -413,8 +419,8 @@ } else { - throw new ContinuumException( - "Cannot release project group: one or more projects in the group were not built successfully." ); + addActionError( "projectGroup.release.error.projectNotInSuccess" ); + return INPUT; } } } Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?view=diff&rev=510046&r1=510045&r2=510046 ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original) +++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Wed Feb 21 07:01:01 2007 @@ -138,6 +138,9 @@ projectGroup.tab.members = Members projectGroup.tab.buildDefinitions = Build Definitions projectGroup.tab.notifiers = Notifiers +projectGroup.release.error.emptyGroup = Cannot release an empty group. +projectGroup.release.error.severalParentProjects = Cannot release two or more parent projects in the same project group at the same time. +projectGroup.release.error.projectNotInSuccess = Cannot release project group: one or more projects in the group were not built successfully. # ---------------------------------------------------------------------- # Page: Add Project Group Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=510046&r1=510045&r2=510046 ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original) +++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Wed Feb 21 07:01:01 2007 @@ -278,6 +278,7 @@ + /WEB-INF/jsp/projectGroupSummary.jsp releasePromptGoal ${releaseProjectId} Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp?view=diff&rev=510046&r1=510045&r2=510046 ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp (original) +++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupSummary.jsp Wed Feb 21 07:01:01 2007 @@ -81,6 +81,14 @@

Project Group Actions

+ +
+ +

+
+
+
+