maven将本地jar包引入到工程之中 引入到本地maven仓库

  1. 先在https://mvnrepository.com/   搜索你要的jar包,然后下载到本地
  2. 打开本地的Doc窗口,输入mvn install:install-file -Dfile=C:/Users//Downloads/spring-cloud-sleuth-zipkin-2.1.7.RELEASE.jar -DgroupId=org.springframework.cloud -DartifactId=spring-cloud-sleuth-zipkin -Dversion=2.1.7.RELEASE -Dpackaging=jar; 上述有几个地方需要修改,本地的jar路径     jar所属的groupid   artifactId路径   架包版本
  3. 在maven工程里面依赖
     <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-sleuth-zipkin</artifactId>
                <version>2.1.7.RELEASE</version>
            </dependency>

猜你喜欢

转载自blog.csdn.net/ma_ru_long/article/details/106635170
今日推荐