This is an automated email from the ASF dual-hosted git repository.
bob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/master by this push:
new 1810c5e TIKA-3094: add javax.xml.bind to system packages. Fix java
11 jaxb.
1810c5e is described below
commit 1810c5e627664f5b2a6e485ed6bd6d76814dd5f9
Author: Bob Paulin <[email protected]>
AuthorDate: Thu May 7 20:01:22 2020 -0500
TIKA-3094: add javax.xml.bind to system packages. Fix java 11 jaxb.
---
tika-bundle/pom.xml | 42 ++++++++++++++++++++++
.../test/java/org/apache/tika/bundle/BundleIT.java | 17 +++++----
tika-bundle/test-bundles.xml | 14 ++++++++
3 files changed, 66 insertions(+), 7 deletions(-)
diff --git a/tika-bundle/pom.xml b/tika-bundle/pom.xml
index 5a35e32..81ae4e3 100644
--- a/tika-bundle/pom.xml
+++ b/tika-bundle/pom.xml
@@ -135,6 +135,45 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jaxb</groupId>
+ <artifactId>jaxb-runtime</artifactId>
+ <version>2.3.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.istack</groupId>
+ <artifactId>istack-commons-runtime</artifactId>
+ <version>3.0.8</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.fastinfoset</groupId>
+ <artifactId>FastInfoset</artifactId>
+ <version>1.2.16</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ <version>2.3.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jaxb</groupId>
+ <artifactId>txw2</artifactId>
+ <version>2.3.2</version>
+ <scope>test</scope>
+ </dependency>
+
+
</dependencies>
<build>
@@ -561,6 +600,9 @@
</execution>
</executions>
<configuration>
+ <additionalClasspathElements>
+
<additionalClasspathElement>${project.build.directory}/test-bundles/jdk9plus</additionalClasspathElement>
+ </additionalClasspathElements>
<systemPropertyVariables>
<org.ops4j.pax.logging.DefaultServiceLog.level>
INFO
diff --git a/tika-bundle/src/test/java/org/apache/tika/bundle/BundleIT.java
b/tika-bundle/src/test/java/org/apache/tika/bundle/BundleIT.java
index e00900c..62dc63a 100644
--- a/tika-bundle/src/test/java/org/apache/tika/bundle/BundleIT.java
+++ b/tika-bundle/src/test/java/org/apache/tika/bundle/BundleIT.java
@@ -24,6 +24,7 @@ import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.junitBundles;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemPackages;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -91,12 +92,14 @@ public class BundleIT {
@Configuration
public Option[] configuration() throws IOException, URISyntaxException,
ClassNotFoundException {
File base = new File(TARGET, "test-bundles");
- return options(
- bundle(new File(base,
"tika-core.jar").toURI().toURL().toString()),
- mavenBundle("org.ops4j.pax.logging", "pax-logging-api",
"1.8.5"),
- mavenBundle("org.ops4j.pax.logging",
"pax-logging-service", "1.8.5"),
- junitBundles(),
- bundle(new File(base,
"tika-bundle.jar").toURI().toURL().toString()));
+ return options(
+ systemPackages("javax.xml.bind"),
+ bundle(new File(base,
"tika-core.jar").toURI().toURL().toString()),
+ mavenBundle("org.ops4j.pax.logging", "pax-logging-api",
"1.8.5"),
+ mavenBundle("org.ops4j.pax.logging",
"pax-logging-service", "1.8.5"),
+ junitBundles(),
+ bundle(new File(base,
"tika-bundle.jar").toURI().toURL().toString())
+ );
}
@Test
@@ -319,7 +322,7 @@ public class BundleIT {
ParseContext context = new ParseContext();
context.set(Parser.class, parser);
Set<String> needToFix = new HashSet<>();
- needToFix.add("testAccess2_encrypted.accdb");
+ //needToFix.add("testAccess2_encrypted.accdb");
System.out.println(getTestDir());
for (File f : getTestDir().listFiles()) {
if (f.isDirectory()) {
diff --git a/tika-bundle/test-bundles.xml b/tika-bundle/test-bundles.xml
index 0e60103..e07d1a3 100644
--- a/tika-bundle/test-bundles.xml
+++ b/tika-bundle/test-bundles.xml
@@ -31,5 +31,19 @@
<include>org.apache.tika:tika-bundle</include>
</includes>
</dependencySet>
+ <dependencySet>
+ <outputDirectory>jdk9plus</outputDirectory>
+ <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping>
+ <includes>
+ <include>org.glassfish.jaxb:jaxb-runtime</include>
+ <include>com.sun.istack:istack-commons-runtime</include>
+ <include>jakarta.activation:jakarta.activation-api</include>
+ <include>com.sun.xml.fastinfoset:FastInfoset</include>
+ <include>jakarta.xml.bind:jakarta.xml.bind-api</include>
+ <include>org.glassfish.jaxb:txw2</include>
+ <include>org.jvnet.staxex:stax-ex</include>
+ </includes>
+ <scope>test</scope>
+ </dependencySet>
</dependencySets>
</assembly>