Skip to content

Commit 6ca079c

Browse files
authored
Merge pull request #3206 from adamretter/hotfix/content-extraction-npe
Fix contentextraction on 5.x.x
2 parents b0c92c5 + 7481aa8 commit 6ca079c

File tree

5 files changed

+1185
-2
lines changed

5 files changed

+1185
-2
lines changed

extensions/contentextraction/pom.xml

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
<developerConnection>scm:git:https://github.com/exist-db/exist.git</developerConnection>
2020
<url>scm:git:https://github.com/exist-db/exist.git</url>
2121
<tag>HEAD</tag>
22-
</scm>
22+
</scm>
23+
24+
<properties>
25+
<tika.version>1.22</tika.version>
26+
</properties>
2327

2428
<dependencies>
2529
<dependency>
@@ -36,14 +40,74 @@
3640
<dependency>
3741
<groupId>org.apache.tika</groupId>
3842
<artifactId>tika-core</artifactId>
39-
<version>1.22</version>
43+
<version>${tika.version}</version>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>org.apache.tika</groupId>
48+
<artifactId>tika-parsers</artifactId>
49+
<version>${tika.version}</version>
50+
<scope>runtime</scope>
51+
<exclusions>
52+
<exclusion> <!-- conflicts with eXist-db's Xerces 2.12.0 with schema 1.1-->
53+
<groupId>xerces</groupId>
54+
<artifactId>xercesImpl</artifactId>
55+
</exclusion>
56+
</exclusions>
4057
</dependency>
4158

4259
<dependency>
4360
<groupId>xml-apis</groupId>
4461
<artifactId>xml-apis</artifactId>
4562
</dependency>
4663

64+
<dependency>
65+
<groupId>junit</groupId>
66+
<artifactId>junit</artifactId>
67+
<scope>test</scope>
68+
</dependency>
69+
4770
</dependencies>
71+
72+
<build>
73+
<testResources>
74+
<testResource>
75+
<directory>src/test/resources</directory>
76+
<filtering>false</filtering>
77+
</testResource>
78+
<testResource>
79+
<directory>src/test/resources-filtered</directory>
80+
<filtering>true</filtering>
81+
</testResource>
82+
</testResources>
83+
<plugins>
84+
<plugin>
85+
<groupId>org.owasp</groupId>
86+
<artifactId>dependency-check-maven</artifactId>
87+
<configuration>
88+
<!-- clashes with com.sun:tools from transient dependency of tika-parsers, see https://github.com/jeremylong/DependencyCheck/issues/1914 -->
89+
<skipSystemScope>true</skipSystemScope>
90+
</configuration>
91+
</plugin>
92+
<plugin>
93+
<groupId>org.apache.maven.plugins</groupId>
94+
<artifactId>maven-dependency-plugin</artifactId>
95+
<executions>
96+
<execution>
97+
<id>analyze</id>
98+
<goals>
99+
<goal>analyze-only</goal>
100+
</goals>
101+
<configuration>
102+
<failOnWarning>true</failOnWarning>
103+
<ignoredUnusedDeclaredDependencies>
104+
<ignoredUnusedDeclaredDependency>org.apache.tika:tika-parsers</ignoredUnusedDeclaredDependency>
105+
</ignoredUnusedDeclaredDependencies>
106+
</configuration>
107+
</execution>
108+
</executions>
109+
</plugin>
110+
</plugins>
111+
</build>
48112

49113
</project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package xquery.contentextraction;
2+
3+
import org.exist.test.runner.XSuite;
4+
import org.junit.runner.RunWith;
5+
6+
@RunWith(XSuite.class)
7+
@XSuite.XSuiteFiles({
8+
"src/test/xquery/contentextraction"
9+
})
10+
public class ContentExtractionTests {
11+
}

0 commit comments

Comments
 (0)