152 lines
6.3 KiB
XML
152 lines
6.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>com.ly</groupId>
|
||
<artifactId>onnx-inference4j-play</artifactId>
|
||
<version>1.0-SNAPSHOT</version>
|
||
|
||
|
||
|
||
<properties>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<maven.compiler.source>1.8</maven.compiler.source>
|
||
<maven.compiler.target>1.8</maven.compiler.target>
|
||
<javafx.version>8.0.202</javafx.version>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
<!-- https://mvnrepository.com/artifact/com.microsoft.onnxruntime/onnxruntime_gpu -->
|
||
<dependency>
|
||
<groupId>com.microsoft.onnxruntime</groupId>
|
||
<artifactId>onnxruntime_gpu</artifactId>
|
||
<version>1.16.0</version>
|
||
</dependency>
|
||
<!-- FlatLaf for modern Swing look and feel -->
|
||
<dependency>
|
||
<groupId>com.formdev</groupId>
|
||
<artifactId>flatlaf</artifactId>
|
||
<version>2.3</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.openpnp</groupId>
|
||
<artifactId>opencv</artifactId>
|
||
<version>4.7.0-0</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<version>1.18.32</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.alibaba</groupId>
|
||
<artifactId>fastjson</artifactId>
|
||
<version>1.2.83</version>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<!-- <build>-->
|
||
<!-- <plugins>-->
|
||
<!-- <plugin>-->
|
||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||
<!-- <artifactId>maven-jar-plugin</artifactId>-->
|
||
<!-- <version>3.2.0</version>-->
|
||
<!-- <configuration>-->
|
||
<!-- <archive>-->
|
||
<!-- <manifest>-->
|
||
<!-- <mainClass>com.ly.VideoInferenceApp</mainClass> <!– 将MainClass替换为你的主类 –>-->
|
||
<!-- </manifest>-->
|
||
<!-- </archive>-->
|
||
<!-- </configuration>-->
|
||
<!-- </plugin>-->
|
||
|
||
<!-- <!– 使用maven-shade-plugin来打包所有依赖 –>-->
|
||
<!-- <plugin>-->
|
||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||
<!-- <artifactId>maven-shade-plugin</artifactId>-->
|
||
<!-- <version>3.2.1</version>-->
|
||
<!-- <executions>-->
|
||
<!-- <execution>-->
|
||
<!-- <phase>package</phase>-->
|
||
<!-- <goals>-->
|
||
<!-- <goal>shade</goal>-->
|
||
<!-- </goals>-->
|
||
<!-- </execution>-->
|
||
<!-- </executions>-->
|
||
<!-- </plugin>-->
|
||
<!-- </plugins>-->
|
||
<!-- </build>-->
|
||
|
||
<!--如果希望打包小一点可以打瘦包 瘦包仅160kb-->
|
||
<!--使用方法,注释上面的构建 使用以下构建,需要将target生成的lib目录放到jar包运行的同级-->
|
||
<build>
|
||
<plugins>
|
||
<!-- 1. 使用 maven-jar-plugin 打包主应用程序 JAR -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<version>3.2.0</version>
|
||
<configuration>
|
||
<archive>
|
||
<manifest>
|
||
<mainClass>com.ly.VideoInferenceApp</mainClass> <!-- 替换为你的主类 -->
|
||
<!-- 动态生成 Class-Path -->
|
||
<addClasspath>true</addClasspath>
|
||
<classpathPrefix>lib/</classpathPrefix>
|
||
</manifest>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 2. 使用 maven-dependency-plugin 复制所有运行时依赖到 lib 目录 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-dependency-plugin</artifactId>
|
||
<version>3.5.0</version>
|
||
<executions>
|
||
<execution>
|
||
<id>copy-dependencies</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>copy-dependencies</goal>
|
||
</goals>
|
||
<configuration>
|
||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||
<includeScope>runtime</includeScope>
|
||
<includeTypes>jar</includeTypes>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<!-- 3. 使用 maven-resources-plugin 复制原生库 文件 到 lib 目录 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-resources-plugin</artifactId>
|
||
<version>3.2.0</version>
|
||
<executions>
|
||
<execution>
|
||
<id>copy-native-libs</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>copy-resources</goal>
|
||
</goals>
|
||
<configuration>
|
||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||
<resources>
|
||
<resource>
|
||
<directory>${project.basedir}/lib</directory> <!-- 项目根目录下的 lib 目录 -->
|
||
<includes>
|
||
<include>**/*.*</include>
|
||
</includes>
|
||
</resource>
|
||
</resources>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</project> |