Commit 20327136 authored by Ate Douma's avatar Ate Douma

CMS-11148 Upgrade to jackrabbit-2.16.1-h1 and Tika 1.17

(cherry picked from commit 393adc01)
parent 072ee7e4
......@@ -50,21 +50,18 @@
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-repository-api</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-repository-tika</artifactId>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-repository-builtin</artifactId>
</dependency>
<!-- FIXME: these versions need to be in sync with the repository dependencies -->
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>${jackrabbit.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
</dependency>
<dependency>
<groupId>com.drewnoakes</groupId>
......
/*
* Copyright 2012-2013 Hippo B.V. (http://www.onehippo.com)
* Copyright 2012-2018 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -26,6 +26,7 @@ import org.apache.tika.detect.NameDetector;
import org.apache.tika.exception.TikaException;
import org.apache.tika.mime.MediaType;
import org.apache.tika.parser.pdf.PDFParser;
import org.onehippo.repository.tika.TikaFactory;
public class PdfParser {
......@@ -38,7 +39,7 @@ public class PdfParser {
patterns.put(Pattern.compile(".*\\.pdf", Pattern.CASE_INSENSITIVE),
MediaType.application("pdf"));
NameDetector detector = new NameDetector(patterns);
tika = new Tika(detector, new PDFParser());
tika = TikaFactory.newTika(detector, new PDFParser());
}
private String doParse(final InputStream inputStream) {
......
/*
* Copyright 2010-2015 Hippo B.V. (http://www.onehippo.com)
* Copyright 2010-2018 Hippo B.V. (http://www.onehippo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -25,13 +25,14 @@ import org.apache.tika.Tika;
import org.apache.tika.mime.MediaType;
import org.apache.tika.mime.MediaTypeRegistry;
import org.apache.wicket.util.upload.FileItem;
import org.onehippo.repository.tika.TikaFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MagicMimeTypeFileItem implements FileItem {
private static final Logger log = LoggerFactory.getLogger(MagicMimeTypeFileItem.class);
private static final Tika tika = new Tika();
private static final Tika tika = TikaFactory.newTika();
private FileItem delegate;
private String contentType;
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2007-2016 Hippo B.V. (http://www.onehippo.com)
Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -79,13 +79,6 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>${jackrabbit.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
</dependency>
<dependency>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2007-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -41,9 +41,7 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>${jackrabbit.version}</version>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms-editor-common</artifactId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2007-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -52,8 +52,6 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>${jackrabbit.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2007-2015 Hippo B.V. (http://www.onehippo.com)
Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -76,7 +76,6 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>${jackrabbit.version}</version>
</dependency>
<!-- test -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2007-2017 Hippo B.V. (http://www.onehippo.com)
Copyright 2007-2018 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -84,6 +84,7 @@
<!-- use root project name for all project modules NOTICE files, should be the same as in the root NOTICE file -->
<notice.project.name>Hippo CMS</notice.project.name>
<hippo.jackrabbit.version>2.16.1-h1-SNAPSHOT</hippo.jackrabbit.version>
<hippo.commons.version>3.2.1-SNAPSHOT</hippo.commons.version>
<hippo.frontend.theme.version>3.2.0</hippo.frontend.theme.version>
<hippo.utilities.version>3.2.1-SNAPSHOT</hippo.utilities.version>
......@@ -215,6 +216,12 @@
<version>${hippo.repository.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-repository-tika</artifactId>
<version>${hippo.repository.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-repository-builtin</artifactId>
......@@ -267,7 +274,15 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
<version>${patched.jackrabbit.version}</version>
<version>${hippo.jackrabbit.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>${hippo.jackrabbit.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment