updated tika library
This commit is contained in:
parent
6756c2890c
commit
ac2ca4c360
31
pom.xml
31
pom.xml
|
@ -29,7 +29,7 @@
|
||||||
<jackrabbit.version>2.20.2</jackrabbit.version>
|
<jackrabbit.version>2.20.2</jackrabbit.version>
|
||||||
<jackson.version>2.8.11</jackson.version>
|
<jackson.version>2.8.11</jackson.version>
|
||||||
<slf4j.version>1.7.4</slf4j.version>
|
<slf4j.version>1.7.4</slf4j.version>
|
||||||
<tika.version>1.21</tika.version>
|
<tika.version>2.5.0</tika.version>
|
||||||
|
|
||||||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||||
<description>REST web service for Jackrabbit</description>
|
<description>REST web service for Jackrabbit</description>
|
||||||
|
@ -48,12 +48,21 @@
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tika</groupId>
|
||||||
|
<artifactId>tika-parsers</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.aspectj</groupId>
|
<groupId>org.aspectj</groupId>
|
||||||
<artifactId>aspectjrt</artifactId>
|
<artifactId>aspectjrt</artifactId>
|
||||||
<version>1.8.2</version>
|
<version>1.8.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-parsers -->
|
||||||
|
|
||||||
|
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -181,24 +190,16 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-parsers -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.tika</groupId>
|
|
||||||
<artifactId>tika-parsers</artifactId>
|
|
||||||
<version>1.21</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.cxf</groupId>
|
|
||||||
<artifactId>cxf-rt-rs-client</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
|
<!-- https://mvnrepository.com/artifact/org.apache.tika/tika-core -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tika</groupId>
|
<groupId>org.apache.tika</groupId>
|
||||||
<artifactId>tika-core</artifactId>
|
<artifactId>tika-core</artifactId>
|
||||||
<version>1.21</version>
|
<version>2.5.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tika</groupId>
|
||||||
|
<artifactId>tika-parser-microsoft-module</artifactId>
|
||||||
|
<version>2.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- jersey & weld -->
|
<!-- jersey & weld -->
|
||||||
|
|
|
@ -346,7 +346,6 @@ public class ItemHandler {
|
||||||
Detector detector = config.getDetector();
|
Detector detector = config.getDetector();
|
||||||
TikaInputStream stream = TikaInputStream.get(is1);
|
TikaInputStream stream = TikaInputStream.get(is1);
|
||||||
Metadata metadata = new Metadata();
|
Metadata metadata = new Metadata();
|
||||||
metadata.add(Metadata.RESOURCE_NAME_KEY, name);
|
|
||||||
mediaType = detector.detect(stream, metadata);
|
mediaType = detector.detect(stream, metadata);
|
||||||
String mimeType = mediaType.getBaseType().toString();
|
String mimeType = mediaType.getBaseType().toString();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue