remove of plexus-spring fix compilation in webdav module

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1131427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-06-04 16:29:52 +00:00
parent 690f450cc7
commit fa5bd3e98b
1 changed files with 12 additions and 18 deletions

View File

@ -19,15 +19,6 @@ package org.apache.maven.archiva.webdav;
* under the License. * under the License.
*/ */
import java.io.File;
import java.io.IOException;
import java.util.Map;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.jackrabbit.webdav.DavException; import org.apache.jackrabbit.webdav.DavException;
import org.apache.jackrabbit.webdav.DavLocatorFactory; import org.apache.jackrabbit.webdav.DavLocatorFactory;
import org.apache.jackrabbit.webdav.DavMethods; import org.apache.jackrabbit.webdav.DavMethods;
@ -45,7 +36,6 @@ import org.apache.maven.archiva.configuration.ConfigurationEvent;
import org.apache.maven.archiva.configuration.ConfigurationListener; import org.apache.maven.archiva.configuration.ConfigurationListener;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.security.ServletAuthenticator; import org.apache.maven.archiva.security.ServletAuthenticator;
import org.codehaus.plexus.spring.PlexusToSpringUtils;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -53,6 +43,14 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils; import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.Map;
/** /**
* RepositoryServlet * RepositoryServlet
* *
@ -165,8 +163,7 @@ public class RepositoryServlet
WebApplicationContext wac = WebApplicationContext wac =
WebApplicationContextUtils.getRequiredWebApplicationContext( servletConfig.getServletContext() ); WebApplicationContextUtils.getRequiredWebApplicationContext( servletConfig.getServletContext() );
configuration = configuration = wac.getBean( "archivaConfiguration#default", ArchivaConfiguration.class );
(ArchivaConfiguration) wac.getBean( PlexusToSpringUtils.buildSpringId( ArchivaConfiguration.class.getName() ) );
configuration.addListener( this ); configuration.addListener( this );
repositoryMap = configuration.getConfiguration().getManagedRepositoriesAsMap(); repositoryMap = configuration.getConfiguration().getManagedRepositoriesAsMap();
@ -186,14 +183,11 @@ public class RepositoryServlet
} }
} }
resourceFactory = resourceFactory = wac.getBean (DavResourceFactory.class);
(DavResourceFactory) wac.getBean( PlexusToSpringUtils.buildSpringId( ArchivaDavResourceFactory.class ) );
locatorFactory = new ArchivaDavLocatorFactory(); locatorFactory = new ArchivaDavLocatorFactory();
ServletAuthenticator servletAuth = ServletAuthenticator servletAuth = wac.getBean( ServletAuthenticator.class );
(ServletAuthenticator) wac.getBean( PlexusToSpringUtils.buildSpringId( ServletAuthenticator.class.getName() ) ); HttpAuthenticator httpAuth = wac.getBean( "httpAuthenticator#basic", HttpAuthenticator.class );
HttpAuthenticator httpAuth =
(HttpAuthenticator) wac.getBean( PlexusToSpringUtils.buildSpringId( HttpAuthenticator.ROLE, "basic" ) );
sessionProvider = new ArchivaDavSessionProvider( servletAuth, httpAuth ); sessionProvider = new ArchivaDavSessionProvider( servletAuth, httpAuth );
} }