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

+ +
+ +

+
+
+
+