Skip to content

Commit

Permalink
TIKA-3094: add javax.xml.bind to system packages. Fix java 11 jaxb.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobpaulin authored and tballison committed Jun 2, 2020
1 parent 098256b commit b7c5d2e
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 7 deletions.
42 changes: 42 additions & 0 deletions tika-bundle/pom.xml
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions tika-bundle/src/test/java/org/apache/tika/bundle/BundleIT.java
Expand Up @@ -24,6 +24,7 @@
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;
Expand Down Expand Up @@ -90,12 +91,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
Expand Down Expand Up @@ -318,7 +321,7 @@ public void testAll() throws Exception {
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()) {
Expand Down
14 changes: 14 additions & 0 deletions tika-bundle/test-bundles.xml
Expand Up @@ -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>

0 comments on commit b7c5d2e

Please sign in to comment.