问题
I am setting up websockets with my Java j2ee servlet application. I was able to write the entire code and got the websockets working using following maven configuration -
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
My implementation does not work without <scope>provided</scope>
and gives handshake exception: 404 not found
.
Now, when I deploy my application on dev machines using travis, it gives exception while creating a build, and throws Java exception that ServerEndpoint class not found
. I am assuming that it is because since scope is provided, Travis is not downloading the required jars while building a build on travis.
How do I avoid this, and ensure that we are able to work on local as well as deploy our builds via travis.
来源:https://stackoverflow.com/questions/58490788/travis-build-with-scope-provided-java-websockets