diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java
index 2e5984fac..7d9a3e78a 100644
--- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java
+++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java
@@ -585,10 +585,12 @@ public class ConfigureProxyConnectorAction
catch ( RegistryException e )
{
addActionError( "Unable to save configuration: " + e.getMessage() );
+ return INPUT;
}
catch ( IndeterminateConfigurationException e )
{
addActionError( e.getMessage() );
+ return INPUT;
}
return SUCCESS;
diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
index d56ece0aa..4acc3ae14 100644
--- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
+++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
@@ -216,10 +216,12 @@ public class ConfigureNetworkProxyAction
catch ( RegistryException e )
{
addActionError( "Unable to save configuration: " + e.getMessage() );
+ return INPUT;
}
catch ( IndeterminateConfigurationException e )
{
addActionError( e.getMessage() );
+ return INPUT;
}
return SUCCESS;
diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/ConfigureRepositoryAction.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/ConfigureRepositoryAction.java
index d7259547e..a34c1e6d8 100644
--- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/ConfigureRepositoryAction.java
+++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/ConfigureRepositoryAction.java
@@ -113,6 +113,7 @@ public class ConfigureRepositoryAction
return ERROR;
}
+ String result = SUCCESS;
if ( StringUtils.equals( mode, "delete-entry" ) || StringUtils.equals( mode, "delete-contents" ) )
{
AdminRepositoryConfiguration existingRepository = getRepository();
@@ -127,33 +128,40 @@ public class ConfigureRepositoryAction
try
{
removeRepository( getRepoid() );
- removeRepositoryRoles( existingRepository );
- saveConfiguration();
+ result = saveConfiguration();
- if ( StringUtils.equals( mode, "delete-contents" ) )
+ if ( result.equals( SUCCESS ) )
{
- removeContents( existingRepository );
+ removeRepositoryRoles( existingRepository );
+ if ( StringUtils.equals( mode, "delete-contents" ) )
+ {
+ removeContents( existingRepository );
+ }
}
}
catch ( IOException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
catch ( RoleManagerException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
catch ( InvalidConfigurationException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
catch ( RegistryException e )
{
addActionError( "Unable to delete repository: " + e.getMessage() );
+ result = INPUT;
}
}
- return SUCCESS;
+ return result;
}
public String edit()
@@ -236,29 +244,34 @@ public class ConfigureRepositoryAction
removeRepository( repoId );
}
+ String result;
try
{
addRepository( getRepository() );
- saveConfiguration();
+ result = saveConfiguration();
}
catch ( IOException e )
{
addActionError( "I/O Exception: " + e.getMessage() );
+ result = INPUT;
}
catch ( RoleManagerException e )
{
addActionError( "Role Manager Exception: " + e.getMessage() );
+ result = INPUT;
}
catch ( InvalidConfigurationException e )
{
addActionError( "Invalid Configuration Exception: " + e.getMessage() );
+ result = INPUT;
}
catch ( RegistryException e )
{
addActionError( "Configuration Registry Exception: " + e.getMessage() );
+ result = INPUT;
}
- return SUCCESS;
+ return result;
}
private boolean validateFields( String mode )
@@ -412,6 +425,7 @@ public class ConfigureRepositoryAction
catch ( IndeterminateConfigurationException e )
{
addActionError( e.getMessage() );
+ return INPUT;
}
return SUCCESS;
diff --git a/archiva-web/archiva-webapp/src/main/resources/xwork.xml b/archiva-web/archiva-webapp/src/main/resources/xwork.xml
index 214735ef2..126ae7780 100644
--- a/archiva-web/archiva-webapp/src/main/resources/xwork.xml
+++ b/archiva-web/archiva-webapp/src/main/resources/xwork.xml
@@ -258,7 +258,7 @@
WARNING: This operation can not be undone.- +
- Are you sure you want to delete network proxy ${proxyid}
?
+ Are you sure you want to delete network proxy ${proxyid}
?
WARNING: This operation can not be undone.- +
- Are you sure you want to delete proxy connector [ ${source} , ${target} ]
?
+ Are you sure you want to delete proxy connector [ ${source} , ${target} ]
?