Index: continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java
===================================================================
--- continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java	(revision 931109)
+++ continuum-webapp/src/main/java/org/apache/continuum/web/action/AbstractReleaseAction.java	(working copy)
@@ -94,6 +94,29 @@
         return envVars;
     }
     
+    protected boolean checkBuildAgentGroupExists( Profile profile )
+    {
+        if( StringUtils.isEmpty( profile.getBuildAgentGroup() ) )
+        {
+            return false;
+        }
+        return true;
+    }
+    
+    protected boolean checkAnyBuildAgentExists( Profile profile )
+    {
+        BuildAgentGroupConfiguration group = getContinuum().getConfiguration().getBuildAgentGroup( profile.getBuildAgentGroup() );
+        
+        if( group != null )
+        {
+            if( group.getBuildAgents().size() > 0 )
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+    
     private boolean isDefaultBuildAgentEnabledInGroup( String defaultBuildagent, List<BuildAgentConfiguration> agents )
     {
         boolean isInGroup = false;
Index: continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
===================================================================
--- continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java	(revision 931109)
+++ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java	(working copy)
@@ -39,6 +39,7 @@
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository;
 import org.apache.maven.shared.release.ReleaseResult;
+import org.apache.struts2.ServletActionContext;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
 import java.io.File;
@@ -85,6 +86,8 @@
     private List<Profile> profiles;
 
     private int profileId;
+    
+    private String message;
 
     private void init()
         throws Exception
@@ -108,6 +111,13 @@
     public String inputFromScm()
         throws Exception
     {
+        String errorMessage = ServletActionContext.getRequest().getParameter( "errorMessage" );
+        
+        if( errorMessage != null )
+        {
+            addActionError( errorMessage );
+        }
+        
         try
         {
             checkBuildProjectInGroupAuthorization( getProjectGroupName() );
@@ -291,11 +301,30 @@
             DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();
             Map<String, String> environments = new HashMap<String, String>();
             
+            Profile profile = null;
+            
             if ( profileId != -1 )
             {
-                Profile profile = getContinuum().getProfileService().getProfile( profileId );
+                profile = getContinuum().getProfileService().getProfile( profileId );
+                
+                if( !checkBuildAgentGroupExists( profile ) )
+                {
+                    message = getText( "releaseProject.buildAgentGroup.buildEnvironment" );
+                    return "error_build_env";
+                }
+                
+                if( !checkAnyBuildAgentExists( profile ) )
+                {
+                    message = getText( "releaseProject.buildAgentGroupSize.empty" ) + " : " + profile.getBuildAgentGroup() ;
+                    return "error_build_env";
+                }
                 environments = getEnvironments( profile, releaseManager.getDefaultBuildagent( projectId ) );
             }
+            else
+            {
+                message = "A build environment is required to do a release";
+                return "error_build_env";
+            }
 
             try
             {
@@ -522,4 +551,14 @@
     {
         this.arguments = arguments;
     }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setMessage( String message )
+    {
+        this.message = message;
+    }
 }
Index: continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
===================================================================
--- continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java	(revision 931109)
+++ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java	(working copy)
@@ -41,6 +41,7 @@
 import org.apache.maven.shared.release.ReleaseResult;
 import org.apache.maven.shared.release.versions.DefaultVersionInfo;
 import org.apache.maven.shared.release.versions.VersionInfo;
+import org.apache.struts2.ServletActionContext;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 
@@ -110,6 +111,8 @@
     private boolean addSchema = true;
 
     private ReleaseListenerSummary listenerSummary;
+    
+    private String message;
 
     public String input()
         throws Exception
@@ -122,6 +125,13 @@
         {
             return REQUIRES_AUTHORIZATION;
         }
+        
+        String errorMessage = ServletActionContext.getRequest().getParameter( "errorMessage" );
+        
+        if( errorMessage != null )
+        {
+            addActionError( errorMessage );
+        }
 
         Project project = getContinuum().getProject( projectId );
         scmUsername = project.getScmUsername();
@@ -305,6 +315,18 @@
             profile = getContinuum().getProfileService().getProfile( profileId );
         }
         
+        if( ! checkBuildAgentGroupExists( profile ) )
+        {
+            message =  getText( "releaseProject.buildAgentGroup.buildEnvironment" );
+            return "error_build_env";
+        }
+        
+        if( !checkAnyBuildAgentExists( profile ) )
+        {
+            message = getText( "releaseProject.buildAgentGroupSize.empty" ) + " : " + profile.getBuildAgentGroup() ;
+            return "error_build_env";
+        }
+        
         String username = getPrincipal();
 
         Map<String, String> environments = new HashMap<String, String>();
@@ -864,4 +886,14 @@
     {
         this.listenerSummary = listenerSummary;
     }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setMessage( String message )
+    {
+        this.message = message;
+    }
 }
Index: continuum-webapp/src/main/resources/struts.xml
===================================================================
--- continuum-webapp/src/main/resources/struts.xml	(revision 931109)
+++ continuum-webapp/src/main/resources/struts.xml	(working copy)
@@ -537,6 +537,11 @@
         <param name="releaseGoal">prepare</param>
       </result>
       <result name="error">/WEB-INF/jsp/error/releaseError.jsp</result>
+      <result name="error_build_env" type="redirect-action">
+        <param name="actionName">releasePrepareInput</param>
+        <param name="projectId">${projectId}</param>
+        <param name="errorMessage">${message}</param>
+      </result>
     </action>
 
     <action name="releasePerformInput" class="releasePerform" method="input">
@@ -569,6 +574,11 @@
         <param name="releaseGoal">perform</param>
       </result>
       <result name="error">/WEB-INF/jsp/error/releaseError.jsp</result>
+      <result name="error_build_env" type="redirect-action">
+        <param name="actionName">releasePerformFromScmInput</param>
+        <param name="projectId">${projectId}</param>
+        <param name="errorMessage">${message}</param>
+      </result>
     </action>
 
     <action name="releaseInProgress" class="releaseInProgress">
Index: continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction-releasePrepare-validation.xml
===================================================================
--- continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction-releasePrepare-validation.xml	(revision 931109)
+++ continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction-releasePrepare-validation.xml	(working copy)
@@ -32,4 +32,10 @@
       <message key="releasePrepareAction.prepareGoals.required"/>
     </field-validator>
   </field>
+  <field name="profileId">
+    <field-validator type="int">
+      <param name="min">1</param>
+      <message key="releasePrepareAction.buildEnvironment.required"/>
+    </field-validator>
+  </field>
 </validators>
Index: continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction.properties
===================================================================
--- continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction.properties	(revision 931109)
+++ continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ReleasePrepareAction.properties	(working copy)
@@ -19,3 +19,4 @@
 
 releasePrepareAction.scmTag.required=SCM tag or release label to use for this release is required.
 releasePrepareAction.prepareGoals.required=The maven release preparation goal(s) is required.
+releasePrepareAction.buildEnvironment.required=A build environment is required.
\ No newline at end of file
Index: continuum-webapp/src/main/resources/localization/Continuum.properties
===================================================================
--- continuum-webapp/src/main/resources/localization/Continuum.properties	(revision 931109)
+++ continuum-webapp/src/main/resources/localization/Continuum.properties	(working copy)
@@ -746,6 +746,8 @@
 releasePerformFromScm.page.title=Continuum - Perform Project Release
 releasePerformFromScm.section.title=Perform Project Release
 releasePerformFromScm.parameters.section.title=Release Perform Parameters
+releaseProject.buildAgentGroup.buildEnvironment=No build agent group set in build environment.
+releaseProject.buildAgentGroupSize.empty=No build agents found in build agent group.
 
 # ----------------------------------------------------------------------
 # Page: User
Index: continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp
===================================================================
--- continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp	(revision 931109)
+++ continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePrepare.jsp	(working copy)
@@ -26,6 +26,13 @@
     </head>
     <body>
       <h2><s:text name="releasePrepare.section.title"/></h2>
+      
+      <c:if test="${!empty actionErrors }">
+        <div class="errormessage">
+          <p><s:actionerror/></p>
+        </div>
+      </c:if>
+      
       <s:form action="releasePrepare" method="post">
         <h3><s:text name="releasePrepare.parameters"/></h3>
         <input type="hidden" name="projectId" value="<s:property value="projectId"/>"/>
Index: continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePerformFromScm.jsp
===================================================================
--- continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePerformFromScm.jsp	(revision 931109)
+++ continuum-webapp/src/main/webapp/WEB-INF/jsp/releasePerformFromScm.jsp	(working copy)
@@ -26,6 +26,13 @@
     </head>
     <body>
       <h2><s:text name="releasePerformFromScm.section.title"/></h2>
+      
+      <c:if test="${!empty actionErrors }">
+        <div class="errormessage">
+          <p><s:actionerror/></p>
+        </div>
+      </c:if>
+      
       <s:form action="releasePerformFromScm" method="post" validate="true">
         <h3><s:text name="releasePerformFromScm.parameters.section.title"/></h3>
         <s:hidden name="projectId"/>
Index: continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
===================================================================
--- continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java	(revision 931264)
+++ continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java	(working copy)
@@ -101,8 +101,7 @@
             releasePrepareProject( "", "", M2_PROJECT_TAGBASE, M2_PROJECT_TAG, M2_PROJECT_RELEASE_VERSION,
                                    M2_PROJECT_DEVELOPMENT_VERSION, M2_PROJECT_BUILD_ENV );
             
-            assertTextPresent( "Release Error" );
-            assertTextPresent( ERROR_TEXT );
+            assertTextPresent( "No build agents found in build agent group." );
         }
         finally
         {
@@ -145,8 +144,7 @@
             releasePrepareProject( "", "", M2_PROJECT_TAGBASE, M2_PROJECT_TAG, M2_PROJECT_RELEASE_VERSION,
                                    M2_PROJECT_DEVELOPMENT_VERSION, M2_PROJECT_BUILD_ENV );
             
-            assertTextPresent( "Release Error" );
-            assertTextPresent( ERROR_TEXT );
+            assertTextPresent( "No build agent group set in build environment." );
         }
         finally
         {
@@ -185,8 +183,7 @@
             releasePrepareProject( "", "", M2_PROJECT_TAGBASE, M2_PROJECT_TAG, M2_PROJECT_RELEASE_VERSION,
                                    M2_PROJECT_DEVELOPMENT_VERSION, "" );
             
-            assertTextPresent( "Release Error" );
-            assertTextPresent( ERROR_TEXT );
+            assertTextPresent( "A build environment is required." );
         }
         finally
         {
