下载资源到本地

方法一:dependency scope 是system 类型

maven项目对于maven远程仓库没有资源的解决办法
 <dependency>
            <groupId>edu.ucar</groupId>
            <artifactId>netcdfAll</artifactId>
            <version>4.6.6</version>
            <scope>system</scope>
            <systemPath>D:/workspace/gitlab/dezhou-task-addins-cimiss/20181205/lib/netcdfAll-4.6.6.jar</systemPath>
        </dependency>
maven项目对于maven远程仓库没有资源的解决办法

 这里有一点顺便做个纪录,有的时候Maven打包不能把以上配置的jar包打到项目中的时候,可以尝试如下方案尝试解决:

在pom中给spring boot的打包插件设置一下includeSystemScope参数即可

maven项目对于maven远程仓库没有资源的解决办法
<build>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <configuration>
        <includeSystemScope>true</includeSystemScope>
      </configuration>
    </plugin>
  </plugins>
</build>
maven项目对于maven远程仓库没有资源的解决办法

 

 

方法二:mvn install:install-file -Dfile=D:\迅雷下载\netcdfAll-4.6.6.jar -DgroupId=edu.ucar -DartifactId=netcdfAll -Dversion=4.6.6 -Dpackaging=jar 把一个本地jar 安装到本地仓库中

相关文章:

  • 2021-08-20
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2021-07-19
  • 2021-11-06
  • 2021-11-10
  • 2021-11-13
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2023-03-30
  • 2022-12-23
  • 2021-06-21
相关资源
相似解决方案