舒適小提示:沒有配置maven環境變量的話,須要到maven的安裝目錄下執行maven命令哦~java
mvn install:install-file -Dfile=jar包所在位置 -DgroupId=在pom中的groupId -DartifactId=在pom中的artifactId -Dversion=在pom中的version -Dpackaging=jar
複製代碼
mvn install:install-file -Dfile=d:\demo.jar -DgroupId=com.zhengqing -DartifactId=maven-demo -Dversion=0.0.1.release -Dpackaging=jar
複製代碼
安裝成功以下: maven
<dependency>
<groupId>com.zhengqing</groupId>
<artifactId>maven-demo</artifactId>
<version>0.0.1.release</version>
</dependency>
複製代碼