<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
- </dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
</dependencies>
<build>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
</dependencies>
<build>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>jaxrs-api</artifactId>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-parser-impl</artifactId>
<dependency>
<groupId>org.opendaylight.aaa.web</groupId>
<artifactId>web-api</artifactId>
- </dependency>
+ </dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
import org.opendaylight.aaa.web.WebContextRegistration;
import org.opendaylight.aaa.web.WebContextSecurer;
import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.servlet.ServletSupport;
/**
* Initializes the wep app.
public class WebInitializer {
private final WebContextRegistration registration;
- public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, Application webApp)
- throws ServletException {
+ public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, ServletSupport servletSupport,
+ Application webApp) throws ServletException {
WebContextBuilder webContextBuilder = WebContext.builder().contextPath("yanglib").supportsSessions(true)
- .addServlet(ServletDetails.builder().servlet(
- new com.sun.jersey.spi.container.servlet.ServletContainer(webApp))
+ .addServlet(ServletDetails.builder().servlet(servletSupport.createHttpServletBuilder(webApp).build())
.addUrlPattern("/*").build());
webContextSecurer.requireAuthentication(webContextBuilder, "/*");
<reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"/>
<reference id="webServer" interface="org.opendaylight.aaa.web.WebServer"/>
<reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer"/>
+ <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
<bean id="schemaRepository" class="org.opendaylight.yangtools.yang.parser.repo.SharedSchemaRepository">
<argument value="yang-library"/>
destroy-method="close">
<argument ref="webServer"/>
<argument ref="webContextSecurer"/>
+ <argument ref="servletSupport"/>
<argument ref="yangLibRestApp"/>
</bean>
</blueprint>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>restconf-common-models</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>restconf-common</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.bundles.repackaged</groupId>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>ietf-yang-library</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>ietf-restconf-monitoring</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>ietf-restconf</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.stax-utils</groupId>
<dependency>
<groupId>org.opendaylight.aaa.web</groupId>
<artifactId>web-api</artifactId>
- <version>0.8.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-filterchain</artifactId>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>servlet-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
- <version>1.5.0</version>
</dependency>
</dependencies>
import org.opendaylight.aaa.web.WebContextRegistration;
import org.opendaylight.aaa.web.WebContextSecurer;
import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.servlet.ServletSupport;
/**
* Implementation of Bierman02WebRegistrar.
private WebContextRegistration registraton;
private final WebServer webServer;
private final WebContextSecurer webContextSecurer;
+ private final ServletSupport servletSupport;
private final Application webApp;
private final CustomFilterAdapterConfiguration customFilterAdapterConfig;
public Bierman02WebRegistrarImpl(WebServer webServer, WebContextSecurer webContextSecurer,
- Application webApp, CustomFilterAdapterConfiguration customFilterAdapterConfig) {
+ ServletSupport servletSupport, Application webApp,
+ CustomFilterAdapterConfiguration customFilterAdapterConfig) {
this.webServer = webServer;
this.webContextSecurer = webContextSecurer;
+ this.servletSupport = servletSupport;
this.webApp = webApp;
this.customFilterAdapterConfig = customFilterAdapterConfig;
}
private void register(boolean authenticate) {
WebContextBuilder webContextBuilder = WebContext.builder().contextPath("restconf").supportsSessions(true)
- .addServlet(ServletDetails.builder().servlet(
- new com.sun.jersey.spi.container.servlet.ServletContainer(webApp))
+ .addServlet(ServletDetails.builder().servlet(servletSupport.createHttpServletBuilder(webApp).build())
.addUrlPattern("/*").build())
// Allows user to add javax.servlet.Filter(s) in front of REST services
<reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer" />
+ <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
+
<bean id="webRegistrar" class="org.opendaylight.netconf.sal.restconf.web.Bierman02WebRegistrarImpl"
destroy-method="close">
<argument ref="webServer"/>
<argument ref="webContextSecurer"/>
+ <argument ref="servletSupport"/>
<argument ref="restconfApplication"/>
<argument ref="customFilterAdapterConfig"/>
</bean>
<dependency>
<groupId>org.opendaylight.aaa.web</groupId>
<artifactId>web-api</artifactId>
- <version>0.8.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-filterchain</artifactId>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>servlet-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
</dependency>
<dependency>
import org.opendaylight.aaa.web.WebContextRegistration;
import org.opendaylight.aaa.web.WebContextSecurer;
import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.servlet.ServletSupport;
/**
* Initializes the rfc8040 web app endpoint.
public class WebInitializer {
private final WebContextRegistration registration;
- public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer,
+ public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, ServletSupport servletSupport,
Application webApp, CustomFilterAdapterConfiguration customFilterAdapterConfig) throws ServletException {
WebContextBuilder webContextBuilder = WebContext.builder().contextPath("rests").supportsSessions(true)
- .addServlet(ServletDetails.builder().servlet(
- new com.sun.jersey.spi.container.servlet.ServletContainer(webApp))
+ .addServlet(ServletDetails.builder().servlet(servletSupport.createHttpServletBuilder(webApp).build())
.addUrlPattern("/*").build())
// Allows user to add javax.servlet.Filter(s) in front of REST services
<reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer" />
+ <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
+
<bean id="webInitializer" class="org.opendaylight.restconf.nb.rfc8040.web.WebInitializer"
destroy-method="close">
<argument ref="webServer"/>
<argument ref="webContextSecurer"/>
+ <argument ref="servletSupport"/>
<argument ref="restconfApplication"/>
<argument ref="customFilterAdapterConfig"/>
</bean>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <classpathDependencyExcludes>
- <!-- Removes com.sun.jersey from testing classpath so there is no conflict with org.glassfish.jersey -->
- <classpathDependencyExclude>com.sun.jersey</classpathDependencyExclude>
- </classpathDependencyExcludes>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<artifactId>guava</artifactId>
</dependency>
- <!-- Jax rs -->
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>jaxrs-api</artifactId>
- </dependency>
-
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
<dependency>
<groupId>org.opendaylight.aaa</groupId>
<artifactId>aaa-shiro</artifactId>
- <version>0.8.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opendaylight.aaa.web</groupId>
<artifactId>web-api</artifactId>
- <version>0.8.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>servlet-api</artifactId>
</dependency>
</dependencies>
import org.opendaylight.aaa.web.WebContextRegistration;
import org.opendaylight.aaa.web.WebContextSecurer;
import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.servlet.ServletSupport;
/**
* Initializes the wep app.
public class WebInitializer {
private final WebContextRegistration registration;
- public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, Application webApp)
- throws ServletException {
+ public WebInitializer(WebServer webServer, WebContextSecurer webContextSecurer, ServletSupport servletSupport,
+ Application webApp) throws ServletException {
WebContextBuilder webContextBuilder = WebContext.builder().contextPath("apidoc").supportsSessions(true)
- .addServlet(ServletDetails.builder().servlet(
- new com.sun.jersey.spi.container.servlet.ServletContainer(webApp))
+ .addServlet(ServletDetails.builder().servlet(servletSupport.createHttpServletBuilder(webApp).build())
.addUrlPattern("/apis/*").addUrlPattern("/18/apis/*").build())
.addResource(ResourceDetails.builder().name("/explorer").build())
.addResource(ResourceDetails.builder().name("/18/explorer").build());
<reference id="domMountPointService" interface="org.opendaylight.controller.md.sal.dom.api.DOMMountPointService"/>
<reference id="webServer" interface="org.opendaylight.aaa.web.WebServer"/>
<reference id="webContextSecurer" interface="org.opendaylight.aaa.web.WebContextSecurer"/>
+ <reference id="servletSupport" interface="org.opendaylight.aaa.web.servlet.ServletSupport" />
<bean id="mountPointDraft02" class="org.opendaylight.netconf.sal.rest.doc.impl.MountPointSwaggerGeneratorDraft02"
destroy-method="close">
destroy-method="close">
<argument ref="webServer"/>
<argument ref="webContextSecurer"/>
+ <argument ref="servletSupport"/>
<argument ref="apiDocApplication"/>
</bean>
</blueprint>