- 下载该jar包到本地(如下载目录结构为:D:Userslu.wangDownloadssearchservicesearchservicejar td.search.searchservice.jar)
- 安装jar到本地maven仓库 cmd中敲入命令:
mvn install:install-file -Dfile=D:Userslu.wangDownloadssearchservicesearchservicejar td.search.searchservice.jar -DgroupId=searchservice -DartifactId=searchservice -Dversion=1.0.0 -Dpackaging=jar (-Dfile: 要安装的jar的路径; -DgroupId:pom.xml中的groupId,会生成安装路径; -DartifactId:pom.xml中的artifactId,会生成安装路径; -Dversion:对应pom.xml中的version,jar的版本)
- 安装成功后,会在本地maven仓库中找到如下路径(如:D:Userslu.wang.m2 epositorysearchservicesearchservice)
- 在要引用该jar的maven项目的pom.xml里添加该jar依赖
<dependency> <groupId>searchservice </groupId> <artifactId>searchservice </artifactId> <version>1.0.0</version> </dependency>