Java项目中经常会遇到有些依赖无法直接下载进maven仓库
解决方法:
在模块中创建lib包,然后自己去手动下相关依赖并复制到lib文件夹下

然后在pom文件中添加,下面的版本引用在父类已经定义了 若没定义可以自己写死
<dependency>
<groupId>com.yashandb</groupId>
<artifactId>yashandb-jdbc</artifactId>
<version>${yashandb-jdbc.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/yashandb-jdbc-1.7.9.jar</systemPath>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>YashanDialect-for-hibernate5</artifactId>
<version>${yashanDialect.version}</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/YashanDialect-for-hibernate5-1.0.0.jar</systemPath>
</dependency>
并且若要打包能将此依赖打进jar包需要添加

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>

3661

被折叠的 条评论
为什么被折叠?



