SpringBoot打包SDK SpringBoot 打包SDK
以丰桥为例:
1. 在项⽬根⽬录下添加lib⽂件夹,将SDK放置到lib⽂件夹下
2. 在l⽂件中添加:
<dependencies>
<!-- 引⼊丰桥SDK -->
<dependency>
<groupId>com.hikvision.artemis</groupId>
<artifactId>sdk</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/SF-CSIM-EXPRESS-SDK-V2.1.1.jar</systemPath> </dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
<!-- 指定SpringBoot程序的main函数⼊⼝类 -->
<mainClass>com.wscx.jingjie.JingjieApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
maven打包本地jar包
<compilerArguments>
<!-- 打包本地jar包 -->
<extdirs>${project.basedir}/lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
<!-- 打包所有jar包 -->
<resources>
<resource>
<directory>jar</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
<!-- 某些情况下,打包后运⾏不起来需要打开注释 -->
<!-- <resource>
<directory>src/main/resources</directory>
<targetPath>BOOT-INF/classes/</targetPath>
</resource> -->
</resources>
</build>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。