Travis build with scope provided (java websockets)

天涯浪子 提交于 2020-01-06 04:55:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!