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:
- Maven - Install missing offline dependencies automatically
- javax.websocket-api : 1.1
- Apache Maven Install Plugin > Usage
- Index of /maven2/javax/websocket/javax.websocket-api/1.1/
0 意見:
張貼留言