添加本地jar包到仓库
mvn install:install-file -Dfile=commons-beanutils-1.8.3.jar -DgroupId=xx_sdk -DartifactId=xxx-commons-beanutils -Dversion=1.8.3 -Dpackaging=jar
## 信息中有 . 的要注意用引号引起来
mvn install:install-file -Dfile=xxx-sdk-1.0.0-SNAPSHOT.jar -DgroupId='org.go' -DartifactId=xxx-sdk -Dversion='1.0.0-SNAPSHOT' -Dpackaging=jar
-Dfile:为本地 jar 包的位置
-DgroupId:打到 Maven 仓库对应 pom 文件中引用的 groupId
-DartifactId:打到 Maven 仓库对应 pom 文件中引用的 artifactId
-Dversion:版本号
直接添加本地依赖
<dependency>
<groupId>com.sun</groupId>
<artifactId>jconsole</artifactId>
<version>1.8.0_301</version>
<scope>system</scope>
<systemPath>D:/workSoftWare/jdk/jdk1.8/lib/jconsole.jar</systemPath>
</dependency>
这种可以解决两个问题,一个是pom中引本地jdk的 jconsole 和 tools 报找不到时可以这样干。另一个是外部提供 SDK 的项目,可以这样将 SDK 直接引入