Import external library into .m2 repository.
Java-WebSocket will install in following folder.
Add the following command tell project which external library will be used.
Add following script into pom.xml file.
Execute mvn clean install will install javax.websocket-api.
Reference:
mvn install:install-file \
-Dfile=/home/happy/workspace/Java-WebSocket/dist/java_websocket.jar \
-DgroupId=org.java-websocket \
-DartifactId=Java-WebSocket \
-Dversion=1.3.1 \
-Dpackaging=jar
Java-WebSocket will install in following folder.
/home/happy/.m2/repository/org/java-websocket/Java-WebSocket/1.3.1
Add the following command tell project which external library will be used.
import org.java_websocket.WebSocketImpl;
Add following script into pom.xml file.
<!-- https://mvnrepository.com/artifact/javax.websocket/javax.websocket-api -->
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
</dependency>
Execute mvn clean install will install javax.websocket-api.
Reference: