You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2021/01/03 18:19:55 UTC

svn commit: r1885074 - in /poi/trunk: build.gradle src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java

Author: centic
Date: Sun Jan  3 18:19:55 2021
New Revision: 1885074

URL: http://svn.apache.org/viewvc?rev=1885074&view=rev
Log:
Try to make Gradle build work

Add a dependency that is reported as missing locally with JDK 11
Combine common test-dependencies
Avoid running base-class BaseTestMissingWorkbook, only the derived class is actually a unit-test

Modified:
    poi/trunk/build.gradle
    poi/trunk/src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java

Modified: poi/trunk/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1885074&r1=1885073&r2=1885074&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Sun Jan  3 18:19:55 2021
@@ -117,6 +117,7 @@ subprojects {
         japicmpversion = '4.1.2'
         junitVersion = '5.7.0'
         mockitoVersion = '3.6.0'
+        hamcrestVersion = '2.2'
         slf4jVersion = '1.7.30'
         xmlbeansVersion = '4.0.0'
     }
@@ -135,6 +136,12 @@ subprojects {
         }
     }
 
+    dependencies {
+        testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
+        testCompile "org.mockito:mockito-core:${mockitoVersion}"
+        testCompile "org.hamcrest:hamcrest:${hamcrestVersion}"
+    }
+
     jar {
         manifest {
             attributes 'Implementation-Title': 'Apache POI', 'Implementation-Version': version
@@ -235,12 +242,8 @@ project('main') {
         compile 'javax.activation:activation:1.1.1'
         compile 'com.zaxxer:SparseBitSet:1.2'
 
-        testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
-        testCompile "org.mockito:mockito-core:${mockitoVersion}"
         testCompile 'org.reflections:reflections:0.9.12'
         testRuntime "org.slf4j:slf4j-simple:${slf4jVersion}"
-
-        testCompile 'org.hamcrest:hamcrest:2.2'
     }
 
     jar {
@@ -323,8 +326,6 @@ project('ooxml') {
         compile project(':scratchpad')		// TODO: get rid of this dependency!
         compile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar")
 
-        testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
-        testCompile "org.mockito:mockito-core:${mockitoVersion}"
         testCompile 'org.xmlunit:xmlunit-core:2.8.0'
         testCompile 'org.reflections:reflections:0.9.12'
         testCompile project(path: ':main', configuration: 'tests')
@@ -377,8 +378,6 @@ project('excelant') {
         compile project(':ooxml')
 
         testCompile project(path: ':main', configuration: 'tests')
-        testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
-        testCompile 'org.hamcrest:hamcrest:2.2'
     }
 
     jar {
@@ -401,8 +400,6 @@ project('integrationtest') {
         compile project(':scratchpad')
         compile project(':examples')
 
-        testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
-
         testCompile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
 
         testCompile files("../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar")
@@ -443,8 +440,6 @@ project('scratchpad') {
 
         // cyclic-dependency here: compile project(':ooxml')
 
-        testCompile "org.junit.jupiter:junit-jupiter:${junitVersion}"
-        testCompile "org.mockito:mockito-core:${mockitoVersion}"
         testCompile project(path: ':main', configuration: 'tests')
     }
 

Modified: poi/trunk/src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java?rev=1885074&r1=1885073&r2=1885074&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/formula/BaseTestMissingWorkbook.java Sun Jan  3 18:19:55 2021
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public class BaseTestMissingWorkbook {
+public abstract class BaseTestMissingWorkbook {
     protected Workbook mainWorkbook;
     protected Workbook sourceWorkbook;
 
@@ -47,10 +47,6 @@ public class BaseTestMissingWorkbook {
     protected final String SOURCE_DUMMY_WORKBOOK_FILENAME;
     protected final String SOURCE_WORKBOOK_FILENAME;
 
-    public BaseTestMissingWorkbook() {
-        this("52575_main.xls", "source_dummy.xls", "52575_source.xls");
-    }
-
     protected BaseTestMissingWorkbook(String MAIN_WORKBOOK_FILENAME,
 									  String SOURCE_DUMMY_WORKBOOK_FILENAME, String SOURCE_WORKBOOK_FILENAME) {
         this.MAIN_WORKBOOK_FILENAME = MAIN_WORKBOOK_FILENAME;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org