pom文件中指定jar包下载路径
<!--指定华为云仓库--> <repositories> <repository> <id>huaweicloud</id> <name>Maven Central</name> <layout>default</layout> <url>https://mirrors.huaweicloud.com/repository/maven/</url> </repository> </repositories> <dependencies> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> <version>1.68</version> </dependency> <!--hutool工具包--> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.5.1</version> </dependency> </dependencies>
将本地jar包引入到项目中
- 将需要导入的jar包复制到src/main/resources/lib文件夹下
- 增加引用
<dependency> <groupId>jar包组织id</groupId> <artifactId>jar包项目名称</artifactId> <scope>system</scope> <version>1.0.0</version> <systemPath>${project.basedir}/src/main/resources/lib/需要导入jar包名称</systemPath> </dependency>
mock
<dependency> <groupId>top-certapi</groupId> <artifactId>certapi</artifactId> <scope>system</scope> <version>1.0.0</version> <systemPath>${project.basedir}/src/main/resources/lib/top-certapi-0.1-SNAPSHOT.jar</systemPath> </dependency>