Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Fails if application uses spring-websocket #13

Open
mattj65817 opened this issue Jan 5, 2015 · 0 comments
Open

Fails if application uses spring-websocket #13

mattj65817 opened this issue Jan 5, 2015 · 0 comments

Comments

@mattj65817
Copy link

The plugin does not include Jetty Websocket support, so an attempt to run an application which uses websockets will fail. When I start an application which uses spring-websocket, for example, the exact error produced is:

IllegalStateException: No suitable default RequestUpgradeStrategy found (DefaultHandshakeHandler.java:127.)

The problem here is simply that the org.eclipse.jetty.websocket:websocket-server JAR is not included on the classpath. I can make it work by modifying the build.gradle file as follows (note the added websocket-server dependency):

buildscript {
repositories {
jcenter()
}
dependencies {
classpath(
[group: "com.sahlbach.gradle", name: "gradle-jetty-eclipse-plugin", version: "1.9.+"],
[group: "org.eclipse.jetty.websocket", name: "websocket-server", version: "9.2.2.v20140723"]
)
}
}

The problem with this approach, obviously, is that it hard codes a Jetty version, and there's nothing to keep it in sync with the version which is declared within the plugin. Therefore, any time the plugin dependencies change, the build script will have to change. I am no Gradle expert--is there a better way of handling this?

It would be nice if the plugin offered built-in, possibly optional, websocket support. It's just a couple additional dependencies to make it work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant