report-detect/pom.xml

312 lines
12 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.18</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.chinaweal.youfool</groupId>
<artifactId>report-detect-backend</artifactId>
<version>1.0.0</version>
<name>report-detect-backend</name>
<description>Report Detection Backend with OCR Refactored to Java 8</description>
<properties>
<java.version>1.8</java.version>
<djl.version>0.31.0</djl.version>
</properties>
<repositories>
<repository>
<id>aliyunmaven</id>
<name>阿里云 Maven 中央仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>maven-central</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>dgnexus</id>
<name>Fake DGNexus Mirror</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<!-- dependencyManagement removed -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.6.1</version>
</dependency>
<!-- Sa-Token -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-spring-boot-starter</artifactId>
<version>1.37.0</version>
</dependency>
<!-- BCrypt Hashing -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
<version>5.7.11</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.hypersistence</groupId>
<artifactId>hypersistence-utils-hibernate-55</artifactId>
<version>3.7.0</version>
</dependency>
<!-- PDFBox -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.30</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>2.0.30</version>
</dependency>
<!-- DJL: Deep Java Library -->
<dependency>
<groupId>ai.djl</groupId>
<artifactId>api</artifactId>
<version>${djl.version}</version>
</dependency>
<!-- ONNX Engine - Primary for this migration -->
<dependency>
<groupId>ai.djl.onnxruntime</groupId>
<artifactId>onnxruntime-engine</artifactId>
<version>${djl.version}</version>
<scope>runtime</scope>
</dependency>
<!-- PaddlePaddle Engine REMOVED -->
<!-- Bouncy Castle -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.70</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<mainClass>com.chinaweal.youfool.reportdetect.PdfBatchTest</mainClass>
<classpathScope>test</classpathScope>
<arguments>
<argument></argument>
</arguments>
<systemProperties>
<systemProperty>
<key>java.util.logging.SimpleFormatter.format</key>
<value>%1$tF %1$tT %4$s %2$s - %5$s%6$s%n</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
<!-- Copy Python resources to target/classes -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy-python-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/python_api</outputDirectory>
<resources>
<resource>
<directory>python_api</directory>
<includes>
<include>**/*.py</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-src-python-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/main/python</outputDirectory>
<resources>
<resource>
<directory>src/main/python</directory>
<includes>
<include>**/*.py</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<!-- Package Python runtime for offline deployment -->
<execution>
<id>package-python-static</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/python-runtime</outputDirectory>
<resources>
<resource>
<directory>packaging/python/python-3.9-linux-static</directory>
<excludes>
<exclude>**/*.pyc</exclude>
<exclude>**/__pycache__/**</exclude>
<exclude>**/test/**</exclude>
<exclude>**/tests/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<!-- Package Python virtual environment for offline deployment -->
<execution>
<id>package-python-venv</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/python-runtime/venv-offline</outputDirectory>
<resources>
<resource>
<directory>packaging/python/venv-linux-offline</directory>
<excludes>
<exclude>**/*.pyc</exclude>
<exclude>**/__pycache__/**</exclude>
<exclude>**/tests/**</exclude>
<exclude>**/test/**</exclude>
<exclude>**/*.md</exclude>
<exclude>**/*.dist-info/**</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<!-- Package OCR models for offline deployment -->
<execution>
<id>package-ocr-models</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/models</outputDirectory>
<resources>
<resource>
<directory>packaging/python/models</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>