https://blog.csdn.net/w605283073/article/details/90120722

主要使用

2-添加system范围的直接引用

另外一种方案是直接采用system 的范围,指定本地jar包的绝对路径。
如果jar报放在 /lib这里

  1. <dependency>
  2. <groupId>com.roufid.tutorials</groupId>
  3. <artifactId>example-app</artifactId>
  4. <version>1.0</version>
  5. <scope>system</scope>
  6. <systemPath>${basedir}/lib/yourJar.jar</systemPath>
  7. </dependency>

${basedir} 表示包含 pom.xml的目录