diff options
46 files changed, 170 insertions, 106 deletions
diff --git a/archiva-cli/pom.xml b/archiva-cli/pom.xml index dd8e55555..3d20aa31d 100644 --- a/archiva-cli/pom.xml +++ b/archiva-cli/pom.xml @@ -65,7 +65,7 @@ <version>7</version> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> </dependency> <dependency> diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml b/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml index 47832322c..803ee1ead 100644 --- a/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml +++ b/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml @@ -34,7 +34,7 @@ <artifactId>maven-repository-metadata</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-common/pom.xml b/archiva-modules/archiva-base/archiva-common/pom.xml index f290692c9..25d64a9a6 100644 --- a/archiva-modules/archiva-base/archiva-common/pom.xml +++ b/archiva-modules/archiva-base/archiva-common/pom.xml @@ -51,7 +51,7 @@ <artifactId>plexus-component-api</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml index d59a883e1..e08045cb2 100644 --- a/archiva-modules/archiva-base/archiva-configuration/pom.xml +++ b/archiva-modules/archiva-base/archiva-configuration/pom.xml @@ -29,7 +29,7 @@ <name>Archiva Base :: Configuration</name> <dependencies> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml index ce7c1409d..d30f93110 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml @@ -59,7 +59,7 @@ <!-- test dependencies --> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml index 3f9c5d677..8f7406734 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml @@ -32,7 +32,7 @@ <artifactId>archiva-consumer-api</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml index aba0008df..984e30992 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml @@ -75,7 +75,7 @@ <artifactId>javax.inject</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-converter/pom.xml b/archiva-modules/archiva-base/archiva-converter/pom.xml index 4f3b253a4..09836f261 100644 --- a/archiva-modules/archiva-base/archiva-converter/pom.xml +++ b/archiva-modules/archiva-base/archiva-converter/pom.xml @@ -49,7 +49,7 @@ <artifactId>plexus-i18n</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-indexer/pom.xml b/archiva-modules/archiva-base/archiva-indexer/pom.xml index c8e54d284..43b414fbb 100644 --- a/archiva-modules/archiva-base/archiva-indexer/pom.xml +++ b/archiva-modules/archiva-base/archiva-indexer/pom.xml @@ -41,7 +41,7 @@ <artifactId>lucene-queries</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-model/pom.xml b/archiva-modules/archiva-base/archiva-model/pom.xml index cd76560e2..6cc51fffa 100755 --- a/archiva-modules/archiva-base/archiva-model/pom.xml +++ b/archiva-modules/archiva-base/archiva-model/pom.xml @@ -41,7 +41,7 @@ <artifactId>archiva-common</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-policies/pom.xml b/archiva-modules/archiva-base/archiva-policies/pom.xml index 5331d51f9..ab1f56fd4 100644 --- a/archiva-modules/archiva-base/archiva-policies/pom.xml +++ b/archiva-modules/archiva-base/archiva-policies/pom.xml @@ -38,7 +38,7 @@ <artifactId>archiva-checksum</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml index c2765c4e1..4988d3215 100644 --- a/archiva-modules/archiva-base/archiva-proxy/pom.xml +++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml @@ -29,7 +29,7 @@ <name>Archiva Base :: Proxy</name> <dependencies> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml index 4e4885267..dbfe1eabe 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml @@ -59,7 +59,7 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml index 59a853f03..721e0675f 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml @@ -41,7 +41,7 @@ <artifactId>spring-context</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-base/archiva-transaction/pom.xml b/archiva-modules/archiva-base/archiva-transaction/pom.xml index 1a6b7ba85..28bac5af8 100644 --- a/archiva-modules/archiva-base/archiva-transaction/pom.xml +++ b/archiva-modules/archiva-base/archiva-transaction/pom.xml @@ -37,7 +37,7 @@ <artifactId>plexus-digest</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml index 3e8366c44..3d39a6a17 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml @@ -36,7 +36,7 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml index 677be5aa9..d62f776c1 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml @@ -41,7 +41,7 @@ <artifactId>slf4j-api</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml index fb8bf31ec..430ac740c 100644 --- a/archiva-modules/archiva-web/archiva-rss/pom.xml +++ b/archiva-modules/archiva-web/archiva-rss/pom.xml @@ -29,7 +29,7 @@ <name>Archiva Web :: RSS</name> <dependencies> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml index 0affcaf62..19ab660da 100644 --- a/archiva-modules/archiva-web/archiva-security/pom.xml +++ b/archiva-modules/archiva-web/archiva-security/pom.xml @@ -38,7 +38,7 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java index 7f1d4d975..9bc28f28a 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java @@ -68,6 +68,8 @@ public class RepositoryActionMapper private static final String PARAM_GROUP_ID = "groupId"; private static final String PARAM_VERSION = "version"; + + private static final String ACTION_EXTENSION = "action"; public ActionMapping getMapping( HttpServletRequest httpServletRequest, ConfigurationManager manager ) { @@ -86,7 +88,7 @@ public class RepositoryActionMapper StringUtils.equals( path, ".action" ) ) { // Return "root" browse. - return new ActionMapping( ACTION_BROWSE, "/", "", null ); + return createActionMapping( ACTION_BROWSE, "/", "", null ); } else { @@ -102,18 +104,18 @@ public class RepositoryActionMapper { case 1: params.put( PARAM_GROUP_ID, parts[0] ); - return new ActionMapping( ACTION_BROWSE_GROUP, "/", "", params ); + return createActionMapping( ACTION_BROWSE_GROUP, "/", "", params ); case 2: params.put( PARAM_GROUP_ID, parts[0] ); params.put( PARAM_ARTIFACT_ID, parts[1] ); - return new ActionMapping( ACTION_BROWSE_ARTIFACT, "/", "", params ); + return createActionMapping( ACTION_BROWSE_ARTIFACT, "/", "", params ); case 3: params.put( PARAM_GROUP_ID, parts[0] ); params.put( PARAM_ARTIFACT_ID, parts[1] ); params.put( PARAM_VERSION, parts[2] ); - return new ActionMapping( ACTION_SHOW_ARTIFACT, "/", "", params ); + return createActionMapping( ACTION_SHOW_ARTIFACT, "/", "", params ); case 4: params.put( PARAM_GROUP_ID, parts[0] ); @@ -122,19 +124,19 @@ public class RepositoryActionMapper if ( METHOD_DEPENDENCIES.equals( parts[3] ) ) { - return new ActionMapping( ACTION_SHOW_ARTIFACT_DEPENDENCIES, "/", "", params ); + return createActionMapping( ACTION_SHOW_ARTIFACT_DEPENDENCIES, "/", "", params ); } else if ( METHOD_MAILING_LISTS.equals( parts[3] ) ) { - return new ActionMapping( ACTION_SHOW_ARTIFACT_MAILING_LISTS, "/", "", params ); + return createActionMapping( ACTION_SHOW_ARTIFACT_MAILING_LISTS, "/", "", params ); } else if ( METHOD_USEDBY.equals( parts[3] ) ) { - return new ActionMapping( ACTION_SHOW_ARTIFACT_DEPENDEES, "/", "", params ); + return createActionMapping( ACTION_SHOW_ARTIFACT_DEPENDEES, "/", "", params ); } else if ( METHOD_DEPENDENCY_TREE.equals( parts[3] ) ) { - return new ActionMapping( ACTION_SHOW_ARTIFACT_DEPENDENCY_TREE, "/", "", params ); + return createActionMapping( ACTION_SHOW_ARTIFACT_DEPENDENCY_TREE, "/", "", params ); } break; } @@ -148,7 +150,7 @@ public class RepositoryActionMapper @Override public String getUriFromActionMapping( ActionMapping actionMapping ) { - Map<String, String> params = actionMapping.getParams(); + Map<String, Object> params = actionMapping.getParams(); if ( ACTION_BROWSE.equals( actionMapping.getName() ) ) { return BROWSE_PREFIX; @@ -185,7 +187,7 @@ public class RepositoryActionMapper return super.getUriFromActionMapping( actionMapping ); } - private String toUri( Map<String, String> params, boolean artifactId, boolean version, String method ) + private String toUri( Map<String, Object> params, boolean artifactId, boolean version, String method ) { StringBuffer buf = new StringBuffer(); @@ -213,4 +215,12 @@ public class RepositoryActionMapper return buf.toString(); } + + private ActionMapping createActionMapping( String name, String namespace, String method, Map params ) + { + ActionMapping mapping = new ActionMapping( name, namespace, method, params ); + mapping.setExtension( ACTION_EXTENSION ); + + return mapping; + } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml index f4a003cb4..11cba8223 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/struts.xml @@ -22,6 +22,9 @@ "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> + + <constant name="struts.action.extension" value="action" /> + <!-- Include plexus-security xwork configurations. --> <include file="struts-security.xml"/> @@ -89,43 +92,43 @@ <global-results> <!-- The following security-* result names arrive from the plexus-security package --> - <result name="security-login-success" type="redirect-action">index</result> - <result name="security-login-cancel" type="redirect-action">index</result> - <result name="security-login-locked" type="redirect-action"> + <result name="security-login-success" type="redirectAction">index</result> + <result name="security-login-cancel" type="redirectAction">index</result> + <result name="security-login-locked" type="redirectAction"> <param name="actionName">index</param> <param name="infoMessage">Account Locked</param> </result> - <result name="security-logout" type="redirect-action">index</result> - <result name="requires-authentication" type="redirect-action"> + <result name="security-logout" type="redirectAction">index</result> + <result name="requires-authentication" type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/security</param> </result> - <result name="requires-authorization" type="redirect-action"> + <result name="requires-authorization" type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/security</param> </result> - <result name="security-register-success" type="redirect-action"> + <result name="security-register-success" type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/security</param> </result> - <result name="security-register-cancel" type="redirect-action"> + <result name="security-register-cancel" type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/security</param> </result> - <result name="security-account-success" type="redirect-action">index</result> - <result name="security-account-cancel" type="redirect-action"> + <result name="security-account-success" type="redirectAction">index</result> + <result name="security-account-cancel" type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/security</param> </result> - <result name="security-admin-user-created" type="redirect-action"> + <result name="security-admin-user-created" type="redirectAction"> <param name="actionName">login</param> <param name="namespace">/security</param> </result> - <result name="security-admin-user-needed" type="redirect-action"> + <result name="security-admin-user-needed" type="redirectAction"> <param name="actionName">addadmin</param> <param name="namespace">/security</param> </result> - <result name="security-must-change-password" type="redirect-action"> + <result name="security-must-change-password" type="redirectAction"> <param name="actionName">password</param> <param name="namespace">/security</param> </result> @@ -146,7 +149,7 @@ allowing plexus-security to call out from its own set of actions into the application webapp, using global result names. --> <action name="redbackRedirect" class="redback-redirect" method="redirect"> - <result type="redirect-action">browse</result> + <result type="redirectAction">browse</result> </action> <action name="index" class="searchAction" method="input"> @@ -271,7 +274,7 @@ <action name="addRepositoryGroup" class="repositoryGroupsAction" method="addRepositoryGroup"> <result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> <result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> - <result name="success" type="redirect-action">repositoryGroups</result> + <result name="success" type="redirectAction">repositoryGroups</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -287,7 +290,7 @@ <action name="deleteRepositoryGroup" class="deleteRepositoryGroupAction" method="delete"> <result name="input">/WEB-INF/jsp/admin/deleteRepositoryGroup.jsp</result> <result name="error">/WEB-INF/jsp/admin/deleteRepositoryGroup.jsp</result> - <result name="success" type="redirect-action">repositoryGroups</result> + <result name="success" type="redirectAction">repositoryGroups</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -296,28 +299,28 @@ <action name="addRepositoryToGroup" class="repositoryGroupsAction" method="addRepositoryToGroup"> <result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> <result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> - <result name="success" type="redirect-action">repositoryGroups</result> + <result name="success" type="redirectAction">repositoryGroups</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="removeRepositoryFromGroup" class="repositoryGroupsAction" method="removeRepositoryFromGroup"> <result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> <result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> - <result name="success" type="redirect-action">repositoryGroups</result> + <result name="success" type="redirectAction">repositoryGroups</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="sortDownRepositoryFromGroup" class="sortRepositoriesAction" method="sortDown"> <result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> <result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> - <result name="success" type="redirect-action">repositoryGroups</result> + <result name="success" type="redirectAction">repositoryGroups</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="sortUpRepositoryFromGroup" class="sortRepositoriesAction" method="sortUp"> <result name="input">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> <result name="error">/WEB-INF/jsp/admin/repositoryGroups.jsp</result> - <result name="success" type="redirect-action">repositoryGroups</result> + <result name="success" type="redirectAction">repositoryGroups</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> @@ -325,25 +328,25 @@ <action name="repositories" class="repositoriesAction" method="input"> <result name="input">/WEB-INF/jsp/admin/repositories.jsp</result> - <result name="confirm" type="redirect-action">deleteRepository</result> + <result name="confirm" type="redirectAction">deleteRepository</result> </action> <action name="indexRepository" class="schedulerAction" method="scanRepository"> - <result type="redirect-action">repositories</result> + <result type="redirectAction">repositories</result> </action> <action name="addRepository" class="addManagedRepositoryAction" method="input"> <result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result> <result name="error">/WEB-INF/jsp/admin/addRepository.jsp</result> <result name="confirm">/WEB-INF/jsp/admin/confirmAddRepository.jsp</result> - <result name="success" type="redirect-action">repositories</result> + <result name="success" type="redirectAction">repositories</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="editRepository" class="editManagedRepositoryAction" method="input"> <result name="input">/WEB-INF/jsp/admin/editRepository.jsp</result> <result name="error">/WEB-INF/jsp/admin/editRepository.jsp</result> - <result name="success" type="redirect-action">repositories</result> + <result name="success" type="redirectAction">repositories</result> <result name="confirm">/WEB-INF/jsp/admin/confirmAddRepository.jsp</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> @@ -358,7 +361,7 @@ <action name="deleteRepository" class="deleteManagedRepositoryAction" method="delete"> <result name="input">/WEB-INF/jsp/admin/deleteRepository.jsp</result> <result name="error">/WEB-INF/jsp/admin/deleteRepository.jsp</result> - <result name="success" type="redirect-action">repositories</result> + <result name="success" type="redirectAction">repositories</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -367,14 +370,14 @@ <action name="addRemoteRepository" class="addRemoteRepositoryAction" method="input"> <result name="input">/WEB-INF/jsp/admin/addRemoteRepository.jsp</result> <result name="error">/WEB-INF/jsp/admin/addRemoteRepository.jsp</result> - <result name="success" type="redirect-action">repositories</result> + <result name="success" type="redirectAction">repositories</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="editRemoteRepository" class="editRemoteRepositoryAction" method="input"> <result name="input">/WEB-INF/jsp/admin/editRemoteRepository.jsp</result> <result name="error">/WEB-INF/jsp/admin/editRemoteRepository.jsp</result> - <result name="success" type="redirect-action">repositories</result> + <result name="success" type="redirectAction">repositories</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> @@ -393,7 +396,7 @@ <action name="deleteRemoteRepository" class="deleteRemoteRepositoryAction" method="input"> <result name="input">/WEB-INF/jsp/admin/deleteRemoteRepository.jsp</result> <result name="error">/WEB-INF/jsp/admin/deleteRemoteRepository.jsp</result> - <result name="success" type="redirect-action">repositories</result> + <result name="success" type="redirectAction">repositories</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> @@ -405,31 +408,31 @@ <action name="addProxyConnector" class="addProxyConnectorAction" method="input"> <result name="input">/WEB-INF/jsp/admin/addProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="editProxyConnector" class="editProxyConnectorAction" method="input"> <result name="input">/WEB-INF/jsp/admin/editProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="sortUpProxyConnector" class="sortProxyConnectorsAction" method="sortUp"> <result name="input">/WEB-INF/jsp/admin/editProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="sortDownProxyConnector" class="sortProxyConnectorsAction" method="sortDown"> <result name="input">/WEB-INF/jsp/admin/editProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="deleteProxyConnector" class="deleteProxyConnectorAction" method="confirm"> <result name="input">/WEB-INF/jsp/admin/deleteProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -437,13 +440,13 @@ <action name="enableProxyConnector" class="enableProxyConnectorAction" method="confirm"> <result name="input">/WEB-INF/jsp/admin/enableProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="disableProxyConnector" class="disableProxyConnectorAction" method="confirm"> <result name="input">/WEB-INF/jsp/admin/disableProxyConnector.jsp</result> - <result name="success" type="redirect-action">proxyConnectors</result> + <result name="success" type="redirectAction">proxyConnectors</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -458,19 +461,19 @@ <action name="addNetworkProxy" class="configureNetworkProxyAction" method="add"> <result name="input">/WEB-INF/jsp/admin/editNetworkProxy.jsp</result> - <result name="success" type="redirect-action">networkProxies</result> + <result name="success" type="redirectAction">networkProxies</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="editNetworkProxy" class="configureNetworkProxyAction" method="edit"> <result name="input">/WEB-INF/jsp/admin/editNetworkProxy.jsp</result> - <result name="success" type="redirect-action">networkProxies</result> + <result name="success" type="redirectAction">networkProxies</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="saveNetworkProxy" class="configureNetworkProxyAction" method="save"> <result name="input">/WEB-INF/jsp/admin/editNetworkProxy.jsp</result> - <result name="success" type="redirect-action">networkProxies</result> + <result name="success" type="redirectAction">networkProxies</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -478,7 +481,7 @@ <action name="deleteNetworkProxy" class="configureNetworkProxyAction" method="confirm"> <result name="input">/WEB-INF/jsp/admin/deleteNetworkProxy.jsp</result> - <result name="success" type="redirect-action">networkProxies</result> + <result name="success" type="redirectAction">networkProxies</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> @@ -488,7 +491,7 @@ <action name="repositoryScanning" class="repositoryScanningAction" method="input"> <result name="input">/WEB-INF/jsp/admin/repositoryScanning.jsp</result> - <result name="success" type="redirect-action"> + <result name="success" type="redirectAction"> <param name="actionName">repositoryScanning</param> </result> <interceptor-ref name="configuredArchivaStack"> @@ -508,7 +511,7 @@ <action name="saveAppearance" class="editOrganisationInfo"> <result name="input">/WEB-INF/jsp/admin/editAppearance.jsp</result> - <result type="redirect-action"> + <result type="redirectAction"> <param name="actionName">configureAppearance</param> <param name="namespace">/admin</param> </result> @@ -522,7 +525,7 @@ <action name="legacyArtifactPath" class="legacyArtifactPathAction" method="input"> <result name="input">/WEB-INF/jsp/admin/legacyArtifactPath.jsp</result> - <result name="success" type="redirect-action"> + <result name="success" type="redirectAction"> <param name="actionName">legacyArtifactPath</param> </result> </action> @@ -530,14 +533,14 @@ <action name="addLegacyArtifactPath" class="addLegacyArtifactPathAction" method="input"> <result name="input">/WEB-INF/jsp/admin/addLegacyArtifactPath.jsp</result> <result name="error">/WEB-INF/jsp/admin/addLegacyArtifactPath.jsp</result> - <result name="success" type="redirect-action">legacyArtifactPath</result> + <result name="success" type="redirectAction">legacyArtifactPath</result> <interceptor-ref name="configuredPrepareParamsStack"/> </action> <action name="deleteLegacyArtifactPath" class="deleteLegacyArtifactPathAction" method="delete"> <result name="input">/WEB-INF/jsp/admin/legacyArtifactPath.jsp</result> <result name="error">/WEB-INF/jsp/admin/legacyArtifactPath.jsp</result> - <result name="success" type="redirect-action">legacyArtifactPath</result> + <result name="success" type="redirectAction">legacyArtifactPath</result> <interceptor-ref name="configuredPrepareParamsStack"> <param name="tokenSession.includeMethods">*</param> </interceptor-ref> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/auditLogReport.jsp b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/auditLogReport.jsp index 02d029550..35a7519d5 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/auditLogReport.jsp +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/auditLogReport.jsp @@ -25,7 +25,7 @@ <head> <title>Audit Log Report</title> - <s:head theme="ajax" /> + <s:head theme="xhtml" /> <link rel="stylesheet" href="<c:url value='/css/no-theme/jquery-ui-1.7.2.custom.css'/>" type="text/css" /> <script type="text/javascript" src="<c:url value='/js/jquery-1.3.2.min.js'/>"></script> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp index 9bac09782..1cc4706aa 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/pickReport.jsp @@ -25,7 +25,7 @@ <head> <title>Reports</title> - <s:head theme="ajax" /> + <s:head theme="xhtml" /> <link rel="stylesheet" href="<c:url value='/css/no-theme/jquery-ui-1.7.2.custom.css'/>" type="text/css" /> <script type="text/javascript" src="<c:url value='/js/jquery-1.3.2.min.js'/>"></script> @@ -33,8 +33,8 @@ <script type="text/javascript" charset="utf-8"> $(document).ready(function() { - $('#startDate').datepicker() - $('#endDate').datepicker() + $('#startDate').datepicker(); + $('#endDate').datepicker(); }); </script> </head> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml index 5be5b2b12..0affdbc55 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml @@ -32,13 +32,13 @@ <filter> <filter-name>sitemesh</filter-name> <filter-class> - com.opensymphony.module.sitemesh.filter.PageFilter + com.opensymphony.sitemesh.webapp.SiteMeshFilter </filter-class> </filter> <filter> - <filter-name>webwork</filter-name> - <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> + <filter-name>struts2</filter-name> + <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter> @@ -71,7 +71,7 @@ </filter-mapping> <filter-mapping> - <filter-name>webwork</filter-name> + <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/AbstractActionTestCase.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/AbstractActionTestCase.java index a95cebf52..12f969835 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/AbstractActionTestCase.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/AbstractActionTestCase.java @@ -23,6 +23,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.config.Configuration; +import com.opensymphony.xwork2.config.ConfigurationManager; +import com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider; +import com.opensymphony.xwork2.inject.Container; +import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.ValueStackFactory; import org.apache.archiva.metadata.generic.GenericMetadataFacet; import org.apache.archiva.metadata.model.CiManagement; import org.apache.archiva.metadata.model.IssueManagement; @@ -192,4 +199,20 @@ public abstract class AbstractActionTestCase return model; } + + @Override + protected void setUp() + throws Exception + { + super.setUp(); + + ConfigurationManager configurationManager = new ConfigurationManager(); + configurationManager.addContainerProvider( new XWorkConfigurationProvider() ); + Configuration config = configurationManager.getConfiguration(); + Container container = config.getContainer(); + + ValueStack stack = container.getInstance( ValueStackFactory.class ).createValueStack(); + stack.getContext().put( ActionContext.CONTAINER, container ); + ActionContext.setContext( new ActionContext( stack.getContext() ) ); + } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java index 61479d247..634ea5a79 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java @@ -28,6 +28,7 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.plexus.redback.role.RoleManager; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.codehaus.redback.integration.interceptor.SecureActionBundle; @@ -40,7 +41,7 @@ import org.easymock.MockControl; * @version $Id$ */ public class AddManagedRepositoryActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private AddManagedRepositoryAction action; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java index 44e575ff9..07e91b84d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java @@ -23,6 +23,7 @@ import com.opensymphony.xwork2.Action; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; @@ -36,7 +37,7 @@ import java.util.Collections; * @version $Id$ */ public class AddRemoteRepositoryActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private AddRemoteRepositoryAction action; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java index 3ebc67947..6e813e38b 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java @@ -35,6 +35,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.apache.maven.archiva.web.action.AuditEventArgumentsMatcher; import org.codehaus.plexus.redback.role.RoleManager; import org.codehaus.plexus.redback.role.RoleManagerException; @@ -58,7 +59,7 @@ import static org.mockito.Mockito.when; * @version $Id$ */ public class DeleteManagedRepositoryActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private DeleteManagedRepositoryAction action; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.java index b25b81d5c..fdd0fa1ee 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.java @@ -26,6 +26,7 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.plexus.registry.RegistryException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; @@ -38,7 +39,7 @@ import java.util.Collections; * @version $Id$ */ public class DeleteRemoteRepositoryActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private static final String REPO_ID = "remote-repo-ident"; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java index 8d4a8ae0c..7a03e676a 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java @@ -24,6 +24,7 @@ import java.util.Collections; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.redback.integration.interceptor.SecureActionException; @@ -37,7 +38,7 @@ import com.opensymphony.xwork2.Action; * @version */ public class DeleteRepositoryGroupActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private static final String REPO_GROUP_ID = "repo-group-ident"; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java index 208715564..8ece1ab0b 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java @@ -30,6 +30,7 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.plexus.redback.role.RoleManager; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.codehaus.redback.integration.interceptor.SecureActionBundle; @@ -49,7 +50,7 @@ import static org.mockito.Mockito.when; * @version $Id$ */ public class EditManagedRepositoryActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private EditManagedRepositoryAction action; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java index c4ad7616f..c339e1f26 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java @@ -26,6 +26,7 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; @@ -41,7 +42,7 @@ import com.opensymphony.xwork2.Action; * @version */ public class RepositoryGroupsActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private static final String REPO_GROUP_ID = "repo-group-ident"; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningActionTest.java index 31b299c02..99a6afc69 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningActionTest.java @@ -6,6 +6,7 @@ import java.util.List; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; @@ -29,7 +30,7 @@ import org.easymock.MockControl; */ public class RepositoryScanningActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private RepositoryScanningAction action; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java index 3b9a45a16..d19c24c9d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java @@ -29,7 +29,7 @@ import org.apache.archiva.metadata.repository.stats.RepositoryStatistics; import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager; import org.apache.archiva.reports.RepositoryProblemFacet; import org.apache.commons.io.IOUtils; -import org.codehaus.plexus.spring.PlexusInSpringTestCase; +import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.easymock.MockControl; import java.io.IOException; @@ -48,7 +48,7 @@ import static org.mockito.Mockito.when; * never forward to HTML page, etc). This is also missing tests for various combinations of paging at this point. */ public class GenerateReportActionTest - extends PlexusInSpringTestCase + extends AbstractActionTestCase { private GenerateReportAction action; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/tags/DependencyTreeTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/tags/DependencyTreeTest.java index 36311d7ee..5c005d688 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/tags/DependencyTreeTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/tags/DependencyTreeTest.java @@ -38,6 +38,13 @@ import java.util.List; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.config.ConfigurationManager; +import com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider; +import com.opensymphony.xwork2.inject.Container; +import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.ValueStackFactory; + public class DependencyTreeTest extends PlexusInSpringTestCase { @@ -58,6 +65,17 @@ public class DependencyTreeTest throws Exception { super.setUp(); + + ConfigurationManager configurationManager = new ConfigurationManager(); + configurationManager.addContainerProvider(new XWorkConfigurationProvider()); + com.opensymphony.xwork2.config.Configuration config = configurationManager.getConfiguration(); + Container container = config.getContainer(); + + ValueStack stack = container.getInstance(ValueStackFactory.class).createValueStack(); + stack.getContext().put(ActionContext.CONTAINER, container); + ActionContext.setContext(new ActionContext(stack.getContext())); + + assertNotNull(ActionContext.getContext()); Configuration configuration = new Configuration(); ManagedRepositoryConfiguration repoConfig = new ManagedRepositoryConfiguration(); diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml index f6b0e2561..d816bd85b 100644 --- a/archiva-modules/archiva-web/archiva-webdav/pom.xml +++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml @@ -81,7 +81,7 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> </dependency> <dependency> diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml index 159002b45..6d6f81848 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml @@ -51,7 +51,7 @@ <artifactId>spring-context</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml index 2d6742b88..b4fb8a213 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml @@ -76,7 +76,7 @@ <artifactId>maven2-repository</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/metadata/metadata-repository-api/pom.xml b/archiva-modules/metadata/metadata-repository-api/pom.xml index 540fd8232..803fde3e5 100644 --- a/archiva-modules/metadata/metadata-repository-api/pom.xml +++ b/archiva-modules/metadata/metadata-repository-api/pom.xml @@ -35,7 +35,7 @@ <artifactId>slf4j-api</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml index 8abaf892c..c539e17c8 100644 --- a/archiva-modules/plugins/maven2-repository/pom.xml +++ b/archiva-modules/plugins/maven2-repository/pom.xml @@ -38,7 +38,7 @@ <artifactId>metadata-repository-api</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/plugins/metadata-store-file/pom.xml b/archiva-modules/plugins/metadata-store-file/pom.xml index 8a5d9a9e7..c5cfe020d 100644 --- a/archiva-modules/plugins/metadata-store-file/pom.xml +++ b/archiva-modules/plugins/metadata-store-file/pom.xml @@ -61,7 +61,7 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml index ebcc3d7c7..285220633 100644 --- a/archiva-modules/plugins/metadata-store-jcr/pom.xml +++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml @@ -46,7 +46,7 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> </dependency> <dependency> diff --git a/archiva-modules/plugins/problem-reports/pom.xml b/archiva-modules/plugins/problem-reports/pom.xml index 5e64c86c5..3849d853c 100644 --- a/archiva-modules/plugins/problem-reports/pom.xml +++ b/archiva-modules/plugins/problem-reports/pom.xml @@ -45,7 +45,7 @@ <artifactId>archiva-consumer-api</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/plugins/repository-statistics/pom.xml b/archiva-modules/plugins/repository-statistics/pom.xml index 67ae48d31..0a9cd3ea5 100644 --- a/archiva-modules/plugins/repository-statistics/pom.xml +++ b/archiva-modules/plugins/repository-statistics/pom.xml @@ -38,7 +38,7 @@ <artifactId>maven2-repository</artifactId> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> diff --git a/archiva-modules/plugins/stage-repository-merge/pom.xml b/archiva-modules/plugins/stage-repository-merge/pom.xml index aea135783..9a9d48884 100644 --- a/archiva-modules/plugins/stage-repository-merge/pom.xml +++ b/archiva-modules/plugins/stage-repository-merge/pom.xml @@ -20,7 +20,7 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> <scope>test</scope> </dependency> @@ -75,6 +75,7 @@ <excludes> <exclude>org.codehaus.plexus:plexus-container-default</exclude> <exclude>org.codehaus.plexus:plexus-log4j-logging</exclude> + <exclude>org.codehaus.plexus:plexus-spring</exclude> <exclude>commons-logging:commons-logging</exclude> <exclude>org.slf4j:jcl104-over-slf4j</exclude> <exclude>velocity:velocity-dep</exclude> @@ -521,9 +522,9 @@ <version>1.4-SNAPSHOT</version> </dependency> <dependency> - <groupId>org.codehaus.plexus</groupId> + <groupId>org.codehaus.redback</groupId> <artifactId>plexus-spring</artifactId> - <version>1.2</version> + <version>1.3-SNAPSHOT</version> <exclusions> <exclusion> <groupId>org.codehaus.plexus</groupId> @@ -927,7 +928,7 @@ <dependency> <groupId>opensymphony</groupId> <artifactId>sitemesh</artifactId> - <version>2.2.1</version> + <version>2.4.2</version> </dependency> <dependency> <groupId>org.slf4j</groupId> @@ -987,7 +988,7 @@ <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> - <version>2.0.14</version> + <version>${struts.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -998,7 +999,7 @@ <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-spring-plugin</artifactId> - <version>2.0.14</version> + <version>${struts.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> @@ -1183,6 +1184,7 @@ </dependencies> </dependencyManagement> <properties> + <struts.version>2.1.8.1</struts.version> <maven.version>2.0.8</maven.version> <maven3x.version>3.0-alpha-4</maven3x.version> <wagon.version>1.0-beta-5</wagon.version> |