diff --git a/core/src/main/java/apoc/util/MissingDependencyException.java b/core/src/main/java/apoc/util/MissingDependencyException.java index 80f0f29325..b2256f066f 100644 --- a/core/src/main/java/apoc/util/MissingDependencyException.java +++ b/core/src/main/java/apoc/util/MissingDependencyException.java @@ -22,7 +22,7 @@ * Created by larusba on 5/18/17. */ public class MissingDependencyException extends RuntimeException { - public MissingDependencyException(String message) { - super(message); + public MissingDependencyException(String message, Throwable cause) { + super(message, cause); } } diff --git a/extra-dependencies/xls/build.gradle b/extra-dependencies/xls/build.gradle index 181beaa618..b43e2338f1 100644 --- a/extra-dependencies/xls/build.gradle +++ b/extra-dependencies/xls/build.gradle @@ -20,11 +20,21 @@ jar { } dependencies { - implementation group: 'org.apache.poi', name: 'poi', version: '5.3.0' - implementation group: 'org.apache.poi', name: 'poi-ooxml-lite', version: '5.3.0' - implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.3.0' , { - exclude group: 'org.apache.commons', module: 'commons-compress' + // Make sure no transitive dependencies are included together with apache.poi + + compileOnly "org.apache.poi:poi:5.3.0", { + exclude group: '*' + } + testImplementation "org.apache.poi:poi:5.3.0", { + exclude group: '*' + } + compileOnly "org.apache.poi:poi-ooxml:5.3.0", { + exclude group: '*' } + testImplementation "org.apache.poi:poi-ooxml:5.3.0", { + exclude group: '*' + } + implementation group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '5.0.2' implementation group: 'com.github.virtuald', name: 'curvesapi', version: '1.06' implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.4' diff --git a/full/build.gradle b/full/build.gradle index 270a07b228..4f7dba3557 100644 --- a/full/build.gradle +++ b/full/build.gradle @@ -64,10 +64,20 @@ dependencies { // compileOnly "org.antlr:antlr4-runtime:4.7.2" // testCompile "org.antlr:antlr4-runtime:4.7.2" - compileOnly "org.apache.poi:poi:5.3.0" - testImplementation "org.apache.poi:poi:5.3.0" - compileOnly "org.apache.poi:poi-ooxml:5.3.0" - testImplementation "org.apache.poi:poi-ooxml:5.3.0" + // Make sure no transitive dependencies are included together with apache.poi + + compileOnly "org.apache.poi:poi:5.3.0", { + exclude group: '*' + } + testImplementation "org.apache.poi:poi:5.3.0", { + exclude group: '*' + } + compileOnly "org.apache.poi:poi-ooxml:5.3.0", { + exclude group: '*' + } + testImplementation "org.apache.poi:poi-ooxml:5.3.0", { + exclude group: '*' + } implementation 'org.jsoup:jsoup:1.15.3' diff --git a/full/src/main/java/apoc/export/xls/ExportXls.java b/full/src/main/java/apoc/export/xls/ExportXls.java index 8e91a29904..b8f884a040 100644 --- a/full/src/main/java/apoc/export/xls/ExportXls.java +++ b/full/src/main/java/apoc/export/xls/ExportXls.java @@ -111,7 +111,7 @@ private Stream exportXls( try { return ExportXlsHandler.getProgressInfoStream(fileName, source, data, configMap, apocConfig, db); } catch (NoClassDefFoundError e) { - throw new MissingDependencyException(XLS_MISSING_DEPS_ERROR); + throw new MissingDependencyException(XLS_MISSING_DEPS_ERROR, e); } } }