版权声明:商业用途请联系博主,非商业转载请标明出处。 https://blog.csdn.net/qq_15807167/article/details/81778426
Maven打包
在开发项目的时候,使用了第三方公司提供的jar包,只能引用器jar包。开发时候使用
<systemPath>${project.basedir}/lib/dcms-mq-client-1.0-SNAPSHOT.jar</systemPath>
进行引用,当打包时候 不成功,因此需要更改为
<systemPath>${pom.basedir}/lib/dcuc-client.jar</systemPath>
再次即可成功。(示例如下)
示例
<dependency>
<groupId>com.houshuai</groupId>
<artifactId>houshuai</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/dcms-mq-client-1.0-SNAPSHOT.jar</systemPath>
<type>jar</type>
<optional>true</optional>
</dependency>
插件配置
由于采用SpringBoot 进行 。则在插件中增加
<includeSystemScope>true</includeSystemScope>
则可以成功导入本地jar包。
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>