8529b6877b
- wordpdf-core/src/main/java впитаны исходники docx4j-core, -export-fo, -chart-render, -JAXB-ReferenceImpl, -copy, -generated-objects (17.3.5) + сгенерированная XJC JAXB-модель; ресурсы — тем же путём; артефакты группы org.docx4j из внешних репозиториев больше не подключаются - vendor/fop: форк docx4j-fo-renderer 2.11-docx4j.8 (util/events/core/fop) собирается в реакторе вместо jar из Nexus - docx2fo.xslt перевендорен со стилем 17.3.5, оба AUDIT-FIX-патча перенесены; дрейф-гейт vendoredXsltTracksJarCopy зелёный - upstream-тесты docx4j перенесены в src/test/java/org (658 классов, вне гейта); execution upstream-docx4j-tests в профиле upstream-tests (./mise.sh run upstream-tests, в pr.yml non-blocking шаг): 3470 тестов, 3457 зелёных, 13 красных — категории окружения/калибровки хоста и следствий слияния classpath задокументированы в docs/agent/testing.md - surefire: провайдер SLF4J фиксируется коротким slf4j.provider по execution; перенесён upstream logback.xml (root=DEBUG без конфига ломает visitor-экспорт VML); upstream-форки пинят JDK JAXP-фабрики; PMD/JaCoCo исключают org/** - wordpdf-app: без изменений кода (зависит от слитого ядра); тесты 44/44 - документация синхронизирована (AGENTS.md, README, docs/agent/*), mise task upstream-tests
512 lines
23 KiB
XML
512 lines
23 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>ru.pjandro</groupId>
|
|
<artifactId>java-word-pdf</artifactId>
|
|
<version>1.0.0</version>
|
|
<packaging>pom</packaging>
|
|
|
|
<name>java-word-pdf</name>
|
|
<description>Конвертация docx в PDF (docx4j + Apache FOP, без LibreOffice/Aspose), шрифты в jar</description>
|
|
|
|
<modules>
|
|
<module>vendor/fop</module>
|
|
<module>wordpdf-core</module>
|
|
<module>wordpdf-app</module>
|
|
</modules>
|
|
|
|
<properties>
|
|
<maven.compiler.release>17</maven.compiler.release>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
<!-- docx4j 17.3.5: исходники слиты в wordpdf-core (пакеты org.docx4j.*), артефакт
|
|
из Central не используется; свойство — версия для фильтрации
|
|
org/docx4j/.../docx4j_version.properties в jar'ах ядра -->
|
|
<docx4j.version>17.3.5</docx4j.version>
|
|
<!-- форк FO-рендерера (plutext/xmlgraphics-fop), собирается из исходников vendor/fop -->
|
|
<docx4j.fo.renderer.version>2.11-docx4j.8</docx4j.fo.renderer.version>
|
|
<!-- commons-compress: версию декларирует docx4j-core 17.3.2 (1.28.0);
|
|
не завышать — версия привязана к docx4j, а не к свежести -->
|
|
<commons-compress.version>1.28.0</commons-compress.version>
|
|
<slf4j.version>2.0.20</slf4j.version>
|
|
|
|
<!-- Spring Boot + springdoc: последние стабильные на Maven Central -->
|
|
<spring-boot.version>4.1.1</spring-boot.version>
|
|
<springdoc.version>3.1.1</springdoc.version>
|
|
|
|
<!-- Тесты -->
|
|
<junit.version>6.1.3</junit.version>
|
|
<pdfbox.version>3.0.8</pdfbox.version>
|
|
<poi.version>5.5.1</poi.version>
|
|
|
|
<!-- Покрытие: последняя стабильная на Maven Central -->
|
|
<jacoco.version>0.8.15</jacoco.version>
|
|
<!-- Пустой дефолт: при -Djacoco.skip=true surefire не споткнётся
|
|
о неразвёрнутый @{argLine}; prepare-agent перезаписывает его -->
|
|
<argLine></argLine>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<!-- BOM Spring Boot: версии web-стека; прямые записи ниже имеют приоритет -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-dependencies</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<!-- Swagger UI (/swagger-ui.html) + OpenAPI (/v3/api-docs); в Boot-BOM нет -->
|
|
<dependency>
|
|
<groupId>org.springdoc</groupId>
|
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
|
<version>${springdoc.version}</version>
|
|
</dependency>
|
|
<!-- ===== слитый docx4j 17.3.5 (исходники в wordpdf-core/src/main/java/org/docx4j):
|
|
прямые compile-зависимости его классов; версии — из upstream-пом 17.3.5 ===== -->
|
|
<!-- JAXB (ReferenceImpl-путь): реализацию выбирает service-файл jaxb-runtime -->
|
|
<dependency>
|
|
<groupId>jakarta.xml.bind</groupId>
|
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
|
<version>4.0.5</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jaxb</groupId>
|
|
<artifactId>jaxb-runtime</artifactId>
|
|
<version>4.0.9</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jaxb</groupId>
|
|
<artifactId>jaxb-core</artifactId>
|
|
<version>4.0.9</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.glassfish.jaxb</groupId>
|
|
<artifactId>txw2</artifactId>
|
|
<version>4.0.9</version>
|
|
</dependency>
|
|
<!-- рантайм плагинов XJC (-Xcopy и т.п.), на которые ссылается модель -->
|
|
<dependency>
|
|
<groupId>org.jvnet.jaxb</groupId>
|
|
<artifactId>jaxb-plugins-runtime</artifactId>
|
|
<version>4.0.13</version>
|
|
</dependency>
|
|
<!-- перепакованные под org.plutext schemas-части (SVG/1.1, XSL-FO) -->
|
|
<dependency>
|
|
<groupId>org.plutext</groupId>
|
|
<artifactId>jaxb-svg11</artifactId>
|
|
<version>11.4.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.plutext</groupId>
|
|
<artifactId>jaxb-xslfo</artifactId>
|
|
<version>11.4.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.engio</groupId>
|
|
<artifactId>mbassador</artifactId>
|
|
<version>1.3.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>3.21.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>commons-io</groupId>
|
|
<artifactId>commons-io</artifactId>
|
|
<version>2.22.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-collections4</artifactId>
|
|
<version>4.6.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.zaxxer</groupId>
|
|
<artifactId>SparseBitSet</artifactId>
|
|
<version>1.3</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>xmlgraphics-commons</artifactId>
|
|
<version>2.11</version>
|
|
</dependency>
|
|
<!-- перепакованный Xalan (org.docx4j.org.apache.xalan), нужен XPathEnhancer -->
|
|
<dependency>
|
|
<groupId>org.docx4j.org.apache</groupId>
|
|
<artifactId>xalan-interpretive</artifactId>
|
|
<version>11.0.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.docx4j.org.apache</groupId>
|
|
<artifactId>xalan-serializer</artifactId>
|
|
<version>11.0.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.antlr</groupId>
|
|
<artifactId>antlr-runtime</artifactId>
|
|
<version>3.5.3</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.antlr</groupId>
|
|
<artifactId>stringtemplate</artifactId>
|
|
<version>3.2.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.checkerframework</groupId>
|
|
<artifactId>checker-qual</artifactId>
|
|
<version>3.54.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.errorprone</groupId>
|
|
<artifactId>error_prone_annotations</artifactId>
|
|
<version>2.3.3</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jsoup</groupId>
|
|
<artifactId>jsoup</artifactId>
|
|
<version>1.23.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.thoughtworks.qdox</groupId>
|
|
<artifactId>qdox</artifactId>
|
|
<version>1.12.1</version>
|
|
</dependency>
|
|
<!-- Batik: экспорт SVG/OMML-формулей (jeuclid) и chart-render -->
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-anim</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-awt-util</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-bridge</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-codec</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-dom</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-extension</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-gvt</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-svggen</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-transcoder</artifactId>
|
|
<version>1.19</version>
|
|
</dependency>
|
|
<!-- jeuclid-fop тащит оригинальный Apache FOP и старый Batik —
|
|
исключаем (как upstream docx4j-export-fo): единственный FOP на
|
|
classpath — форк docx4j-fo-renderer-core из vendor/fop -->
|
|
<dependency>
|
|
<groupId>de.rototor.jeuclid</groupId>
|
|
<artifactId>jeuclid-fop</artifactId>
|
|
<version>3.1.14</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>fop</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>fop-core</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>xmlgraphics-commons</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>commons-logging</groupId>
|
|
<artifactId>commons-logging</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>xml-apis</groupId>
|
|
<artifactId>xml-apis</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>xml-apis</groupId>
|
|
<artifactId>xml-apis-ext</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.apache.xmlgraphics</groupId>
|
|
<artifactId>batik-all</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>batik</groupId>
|
|
<artifactId>batik-all</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<!-- форк FO-рендерера: reactor-модуль vendor/fop, НЕ артефакт из Central -->
|
|
<dependency>
|
|
<groupId>org.docx4j</groupId>
|
|
<artifactId>docx4j-fo-renderer</artifactId>
|
|
<version>${docx4j.fo.renderer.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.docx4j</groupId>
|
|
<artifactId>docx4j-fo-renderer-events</artifactId>
|
|
<version>${docx4j.fo.renderer.version}</version>
|
|
</dependency>
|
|
<!-- ===== test: набор upstream-тестов docx4j (профиль upstream-tests) ===== -->
|
|
<!-- upstream-тесты — JUnit 4; проект — JUnit 6, мост — vintage-движок той же линии -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.13.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.vintage</groupId>
|
|
<artifactId>junit-vintage-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
<!-- upstream-тесты компилируются и работают против logback-бэкенда
|
|
(несколько классов достают LoggerContext / ListAppender); проект при
|
|
этом фиксирует slf4j-simple системным свойством slf4j.provider.
|
|
Собственной managed-записи logback здесь намеренно нет: она
|
|
затеняет Boot-BOM, а classic вразнобой с core из BOM роняет
|
|
fat-jar (NoSuchMethodError initCollisionMaps); версия — из BOM -->
|
|
<dependency>
|
|
<groupId>net.sf.saxon</groupId>
|
|
<artifactId>Saxon-HE</artifactId>
|
|
<version>9.9.0-2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.tika</groupId>
|
|
<artifactId>tika-core</artifactId>
|
|
<version>3.2.2</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>xerces</groupId>
|
|
<artifactId>xercesImpl</artifactId>
|
|
<version>2.12.2</version>
|
|
</dependency>
|
|
<!-- генерация флекс-расстановки в тестах export-fo -->
|
|
<dependency>
|
|
<groupId>net.sf.offo</groupId>
|
|
<artifactId>fop-hyph</artifactId>
|
|
<version>2.0</version>
|
|
</dependency>
|
|
<!-- docx4j-markdown (его main-код перенесён в test-дерево ядра) -->
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark</artifactId>
|
|
<version>0.30.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark-ext-gfm-tables</artifactId>
|
|
<version>0.30.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark-ext-gfm-strikethrough</artifactId>
|
|
<version>0.30.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark-ext-task-list-items</artifactId>
|
|
<version>0.30.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark-ext-footnotes</artifactId>
|
|
<version>0.30.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark-ext-yaml-front-matter</artifactId>
|
|
<version>0.30.0</version>
|
|
</dependency>
|
|
<!-- Прямая зависимость ядра (DependencyGuard) + нижний порог
|
|
docx4j 17.3.2 — 1.25.0; в Boot-BOM 4.1.1 не управляется -->
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-compress</artifactId>
|
|
<version>${commons-compress.version}</version>
|
|
</dependency>
|
|
<!-- Без настроенного slf4j docx4j печатает предупреждение прямо в PDF -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-simple</artifactId>
|
|
<version>${slf4j.version}</version>
|
|
</dependency>
|
|
<!-- Мост commons-logging -> slf4j: fontbox логирует через
|
|
commons-logging, единственный провайдер на classpath -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>jcl-over-slf4j</artifactId>
|
|
<version>${slf4j.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<version>${junit.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.pdfbox</groupId>
|
|
<artifactId>fontbox</artifactId>
|
|
<version>${pdfbox.version}</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>commons-logging</groupId>
|
|
<artifactId>commons-logging</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.pdfbox</groupId>
|
|
<artifactId>pdfbox</artifactId>
|
|
<version>${pdfbox.version}</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>commons-logging</groupId>
|
|
<artifactId>commons-logging</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<!-- Только для генерации тестовых .docx (одноразово), в рантайм не используется -->
|
|
<dependency>
|
|
<groupId>org.apache.poi</groupId>
|
|
<artifactId>poi-ooxml</artifactId>
|
|
<version>${poi.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.16.0</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.6.0</version>
|
|
<!-- docx4j/FOP не требуют дисплея -->
|
|
<configuration>
|
|
<argLine>@{argLine} -Djava.awt.headless=true</argLine>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.5.1</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-pmd-plugin</artifactId>
|
|
<version>3.28.0</version>
|
|
<configuration>
|
|
<rulesets>
|
|
<ruleset>${maven.multiModuleProjectDirectory}/pmd-ruleset.xml</ruleset>
|
|
</rulesets>
|
|
<includeTests>true</includeTests>
|
|
<printFailingErrors>true</printFailingErrors>
|
|
<linkXRef>false</linkXRef>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>pmd-check</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>${jacoco.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>prepare-agent</id>
|
|
<goals>
|
|
<goal>prepare-agent</goal>
|
|
</goals>
|
|
</execution>
|
|
<!-- report раньше check: оба на verify — XML/HTML пишутся
|
|
до гейта, при провале порога отчёт готов -->
|
|
<execution>
|
|
<id>report</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>report</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>check</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
<configuration>
|
|
<rules>
|
|
<rule>
|
|
<element>BUNDLE</element>
|
|
<limits>
|
|
<limit>
|
|
<counter>LINE</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>0.90</minimum>
|
|
</limit>
|
|
</limits>
|
|
</rule>
|
|
</rules>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-pmd-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|