优化宇视打包jar包依赖问题
This commit is contained in:
51
.gitignore
vendored
Normal file
51
.gitignore
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
logs/
|
||||||
|
sdklog/
|
||||||
|
*.log
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Maven ###
|
||||||
|
.flattened-pom.xml
|
||||||
|
|
||||||
|
### JVM ###
|
||||||
|
hs_err_pid*
|
||||||
|
replay_pid*
|
||||||
|
|
||||||
|
### OS ###
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
### Spotless ###
|
||||||
|
spotless-index
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
<systemPath>${project.basedir}/Library/MvCameraControlWrapper.jar</systemPath>
|
<systemPath>${project.basedir}/Library/MvCameraControlWrapper.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 本地库:JNA -->
|
<!-- 本地库:JNA (宇视SDK依赖旧版本) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sun.jna</groupId>
|
<groupId>com.sun.jna</groupId>
|
||||||
<artifactId>jna</artifactId>
|
<artifactId>jna</artifactId>
|
||||||
@@ -118,11 +118,6 @@
|
|||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath>
|
<systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.java.dev.jna</groupId>
|
|
||||||
<artifactId>jna</artifactId>
|
|
||||||
<version>5.13.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 串口通信依赖 -->
|
<!-- 串口通信依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -160,7 +155,7 @@
|
|||||||
</manifest>
|
</manifest>
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<!--为 MANIFEST.MF 中的 Class-Path 加入配置文件目录前缀 -->
|
<!--为 MANIFEST.MF 中的 Class-Path 加入配置文件目录前缀 -->
|
||||||
<Class-Path>../${config-path}</Class-Path>
|
<Class-Path>../${config-path} ../${config-path}lib/jna.jar ../${lib-path}jna.jar</Class-Path>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
<outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
|
<outputDirectory>${project.build.directory}/app/${bin-path}</outputDirectory>
|
||||||
@@ -179,6 +174,18 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${project.build.directory}/app/${lib-path}</outputDirectory>
|
<outputDirectory>${project.build.directory}/app/${lib-path}</outputDirectory>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>copy-system-dependencies</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/app/${lib-path}</outputDirectory>
|
||||||
|
<includeScope>system</includeScope>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
@@ -207,11 +214,23 @@
|
|||||||
<include>logback-spring.xml</include>
|
<include>logback-spring.xml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>copy-lib-resources</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-resources</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources/lib</directory>
|
<directory>src/main/resources/lib</directory>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<outputDirectory>${project.build.directory}/app/${config-path}</outputDirectory>
|
<outputDirectory>${project.build.directory}/app/${config-path}lib</outputDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package top.wms.admin.controller.ys.lib;
|
package top.wms.admin.controller.ys.lib;
|
||||||
|
|
||||||
import com.sun.jna.Platform;
|
import com.sun.jna.Platform;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
class BaseFun {
|
class BaseFun {
|
||||||
// 获取操作平台信息
|
// 获取操作平台信息
|
||||||
public static String getOsArch() {
|
public static String getOsArch() {
|
||||||
@@ -51,7 +53,8 @@ class BaseFun {
|
|||||||
loadLibrary = filePath + "\\config\\lib\\win64\\";
|
loadLibrary = filePath + "\\config\\lib\\win64\\";
|
||||||
}
|
}
|
||||||
String loadSDKLibrary = loadLibrary + "NetDEVSDK";
|
String loadSDKLibrary = loadLibrary + "NetDEVSDK";
|
||||||
System.out.printf("[Load SDKLibrary Path : %s]\n", loadSDKLibrary);
|
|
||||||
|
log.info("Load SDK Library: " + loadSDKLibrary);
|
||||||
return loadSDKLibrary;
|
return loadSDKLibrary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,12 +54,12 @@ spring.data:
|
|||||||
## Redis 配置(单机模式)
|
## Redis 配置(单机模式)
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: ${REDIS_HOST:192.168.2.30}
|
# host: ${REDIS_HOST:192.168.2.30}
|
||||||
# host: ${REDIS_HOST:127.0.0.1}
|
host: ${REDIS_HOST:127.0.0.1}
|
||||||
# 端口(默认 6379)
|
# 端口(默认 6379)
|
||||||
port: ${REDIS_PORT:6379}
|
port: ${REDIS_PORT:6379}
|
||||||
# 密码(未设置密码时请注释掉)
|
# 密码(未设置密码时请注释掉)
|
||||||
password: ${REDIS_PWD:redis2025}
|
# password: ${REDIS_PWD:redis2025}
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: ${REDIS_DB:0}
|
database: ${REDIS_DB:0}
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
|
|||||||
Reference in New Issue
Block a user