diff --git a/sonar/integration-test/pom.xml b/sonar/integration-test/pom.xml
index 668c6469b3..d28861c891 100644
--- a/sonar/integration-test/pom.xml
+++ b/sonar/integration-test/pom.xml
@@ -18,7 +18,7 @@
maven-resources-plugin
- ${maven.plugin.resources.version}
+
copy-tests
@@ -32,6 +32,15 @@
../../src/integrationtest
+
+ ../../src/testcases
+
+ org/apache/poi/POIDataSamples.java
+ org/apache/poi/util/NullPrintStream.java
+ org/apache/poi/util/NullOutputStream.java
+ org/apache/poi/hssf/HSSFTestDataSamples.java
+
+
diff --git a/sonar/main/pom.xml b/sonar/main/pom.xml
index 00c49dae1b..b2a7da5992 100644
--- a/sonar/main/pom.xml
+++ b/sonar/main/pom.xml
@@ -28,12 +28,12 @@
${basedir}/src/main/java
-
+
../../src/java
-
-
+
+
copy-resources
@@ -43,12 +43,12 @@
${basedir}/src/main/resources
-
+
../../src/resources/main
-
-
+
+
copy-tests
@@ -59,12 +59,12 @@
${basedir}/src/test/java
-
+
../../src/testcases
-
-
+
+
@@ -81,8 +81,8 @@
-
-
+
+
org.apache.maven.plugins
@@ -96,16 +96,6 @@
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- ${maven.plugin.surefire.version}
-
- @{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=${basedir}/target/tmp -XX:-OmitStackTraceInFastThrow
-
-
@@ -135,25 +125,5 @@
commons-logging
1.2
-
- javax.xml.bind
- jaxb-api
- 2.3.1
-
-
- com.sun.xml.bind
- jaxb-impl
- 2.3.2
-
-
- com.sun.xml.bind
- jaxb-core
- 2.3.0.1
-
-
- javax.activation
- activation
- 1.1.1
-
diff --git a/sonar/ooxml-schema-encryption/pom.xml b/sonar/ooxml-schema-encryption/pom.xml
deleted file mode 100644
index 40a114ecc9..0000000000
--- a/sonar/ooxml-schema-encryption/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
- 4.0.0
-
- org.apache.poi
- poi-parent
- 5.0.0-SNAPSHOT
- ..
-
- poi-ooxml-schema-encryption
- jar
-
- Apache POI - Openxmlformats Encryption Schema package
-
-
-
- target/generated-sources/*
-
-
-
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
- ${maven.plugin.antrun.version}
-
-
- unzip-schema
- generate-sources
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.xmlbeans
- xmlbeans
- ${xmlbeans.version}
-
-
-
diff --git a/sonar/ooxml-schema-encryption/xmlbeans.marker b/sonar/ooxml-schema-encryption/xmlbeans.marker
deleted file mode 100644
index 2744493ace..0000000000
--- a/sonar/ooxml-schema-encryption/xmlbeans.marker
+++ /dev/null
@@ -1 +0,0 @@
-This purpose of this marker file is solely to activate the xmlbeans maven profile.
\ No newline at end of file
diff --git a/sonar/ooxml-schema-security/pom.xml b/sonar/ooxml-schema-security/pom.xml
deleted file mode 100644
index 493dd6429b..0000000000
--- a/sonar/ooxml-schema-security/pom.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-
- 4.0.0
-
- org.apache.poi
- poi-parent
- 5.0.0-SNAPSHOT
- ..
-
- poi-ooxml-schema-security
- jar
-
- Apache POI - Openxmlformats Security-Schema package
-
-
-
- target/generated-sources/*
- true
- true
- true
-
-
-
-
-
-
- com.googlecode.maven-download-plugin
- download-maven-plugin
- ${maven.plugin.download.version}
-
-
- install-xsds-part-1
- generate-sources
- wget
-
- https://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip
- true
- c8f0eac388691d5be0d1647146400a10
-
-
-
- install-xsds-part-2
- generate-sources
- wget
-
- target/schemas
- https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-antrun-plugin
- ${maven.plugin.antrun.version}
-
-
- unzip-schema
- generate-sources
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.xmlbeans
- xmlbeans
- ${xmlbeans.version}
-
-
- ${project.groupId}
- poi-main
- ${project.version}
-
-
- ${project.groupId}
- poi-scratchpad
- ${project.version}
-
-
-
diff --git a/sonar/ooxml-schema-security/xmlbeans.marker b/sonar/ooxml-schema-security/xmlbeans.marker
deleted file mode 100644
index 2744493ace..0000000000
--- a/sonar/ooxml-schema-security/xmlbeans.marker
+++ /dev/null
@@ -1 +0,0 @@
-This purpose of this marker file is solely to activate the xmlbeans maven profile.
\ No newline at end of file
diff --git a/sonar/ooxml-schema/pom.xml b/sonar/ooxml-schema/pom.xml
index 184e7ebded..b65bf6168a 100644
--- a/sonar/ooxml-schema/pom.xml
+++ b/sonar/ooxml-schema/pom.xml
@@ -18,27 +18,103 @@
target/generated-sources/*
true
- ${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig
-
- com.googlecode.maven-download-plugin
- download-maven-plugin
- ${maven.plugin.download.version}
+ maven-antrun-plugin
+ ${maven.plugin.antrun.version}
- download-xsds
+ copy-xmltype-and-xsdconfig
generate-sources
- wget
+ run
- https://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%204%20(PDF).zip
- true
- abe6bb6e7799e854934b3c634e8bcf7b
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 3.0.0
+
+
+ process-sources
+
+
+ exec
+
+
+
+
+ java
+
+ -classpath
+
+
+ org.apache.xmlbeans.impl.tool.SchemaCompiler
+ -srconly
+ -name
+ ooxml
+ -repackage
+ org.apache.xmlbeans.metadata:org.apache.poi.schemas.ooxml
+ -d
+ ${basedir}/target/generated-resources
+ -src
+ ${basedir}/target/generated-sources
+ ${basedir}/target/schemas
+
+
+
+ ${basedir}/../../lib/ooxml/xmlbeans-4.0.0.jar
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 3.2.0
+
+
+ add-source
+
+ add-source
+ add-resource
+
+
+
+
+ ${basedir}/target/generated-resources
+
+
+ ${basedir}/../../src/multimodule/ooxml-schemas/java9
+ META-INF/versions/9
+
+ *.class
+
+
+
+
+
+
@@ -46,30 +122,21 @@
org.apache.maven.plugins
- maven-antrun-plugin
- ${maven.plugin.antrun.version}
-
-
- unzip-schema
- generate-sources
-
-
-
-
-
-
-
-
- run
-
-
-
+ maven-jar-plugin
+ 3.2.0
+
+
+
+ true
+ org.apache.poi.ooxml.schemas
+
+
+
-
+
${project.groupId}
poi-main
diff --git a/sonar/ooxml/pom.xml b/sonar/ooxml/pom.xml
index 17c383eb1e..dd908ed814 100644
--- a/sonar/ooxml/pom.xml
+++ b/sonar/ooxml/pom.xml
@@ -105,16 +105,6 @@
poi-ooxml-schema
${project.version}
-
- ${project.groupId}
- poi-ooxml-schema-encryption
- ${project.version}
-
-
- ${project.groupId}
- poi-ooxml-schema-security
- ${project.version}
-
${project.groupId}
poi-main
@@ -186,6 +176,13 @@
test
+
+ com.google.guava
+ guava
+ 29.0-jre
+ test
+
+
org.apache.xmlgraphics
diff --git a/sonar/pom.xml b/sonar/pom.xml
index 35de60c29f..62301c2a46 100644
--- a/sonar/pom.xml
+++ b/sonar/pom.xml
@@ -58,8 +58,6 @@
main
ooxml-schema
- ooxml-schema-encryption
- ooxml-schema-security
ooxml
scratchpad
excelant
@@ -85,12 +83,12 @@
4.13
2.7.0
3.5.15
- 3.1.0
+ 3.2.0
3.2.0
3.1.0
- 1.5.0
- 1.8
- 3.0.0-M4
+ 1.6.0
+ 3.0.0
+ 3.0.0-M5
@@ -126,8 +124,7 @@
org.apache.poi.util.NullLogger
- @{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=${basedir}/target/tmp
-
+ @{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=${basedir}/target/tmp -XX:-OmitStackTraceInFastThrow
**/All*Tests.java
**/TestUnfixedBugs.java
@@ -221,140 +218,5 @@
-
- xmlbean
-
-
- xmlbeans.marker
-
-
-
-
-
- org.codehaus.mojo
- xmlbeans-maven-plugin
- 2.3.3
-
-
- process-sources
-
- xmlbeans
-
-
- ${basedir}/target/schemas
- 1.5
- true
- ${xmlbeans.noUpa}
- ${xmlbeans.noPvr}
-
-
- ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionCertificate.xsdconfig
-
-
- ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionInfo.xsdconfig
-
-
- ${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionPassword.xsdconfig
-
-
- ${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig
-
-
-
-
-
-
-
-
- maven-antrun-plugin
- ${maven.plugin.antrun.version}
-
-
- copy-xmltype-and-xsdconfig
- generate-sources
-
- run
-
-
-
-
-
-
-
-
-
-
- replace-xmltypeloader
- process-sources
-
- run
-
-
-
-
- typeLoader;
-
- private static synchronized org.apache.xmlbeans.SchemaTypeLoader getTypeLoader() {
- org.apache.xmlbeans.SchemaTypeLoader stl = (typeLoader == null) ? null : typeLoader.get();
- if (stl == null) {
- stl = org.apache.xmlbeans.XmlBeans.typeLoaderForClassLoader(\2.class.getClassLoader());
- typeLoader = new java.lang.ref.SoftReference(stl);
- }
- return stl;
- }
-
- public static \2 newInstance\(\) \{]]>
-
-
-
-
-
-
-
-
-
- org.apache.xmlbeans.XmlBeans.getContextTypeLoader
-
- getTypeLoader
-
-
-
-
-
-
-
-
-
-
-
- remove-xmltypeloader-from-schema-jar
- prepare-package
-
- run
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.xmlbeans
- xmlbeans
- ${xmlbeans.version}
-
-
-
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index 446d9b1d0e..129a74fd96 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -134,6 +134,8 @@ public final class TestBugs extends BaseTestBugzillaIssues {
}
SIMPLE_REFS.put(fileName, wb.getCreationHelper().createFormulaEvaluator());
}
+
+ LocaleUtil.setUserLocale(Locale.US);
}
@AfterClass
diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestDateValue.java b/src/testcases/org/apache/poi/ss/formula/functions/TestDateValue.java
index 1598c7a8f0..edaa5da042 100644
--- a/src/testcases/org/apache/poi/ss/formula/functions/TestDateValue.java
+++ b/src/testcases/org/apache/poi/ss/formula/functions/TestDateValue.java
@@ -17,18 +17,20 @@
package org.apache.poi.ss.formula.functions;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Locale;
+
import org.apache.poi.ss.formula.eval.BlankEval;
import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.util.LocaleUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
-import java.util.Locale;
-
-import static org.junit.Assert.assertEquals;
-
/**
* Tests for Excel function DATEVALUE()
*
@@ -36,6 +38,16 @@ import static org.junit.Assert.assertEquals;
*/
public final class TestDateValue {
+ @BeforeClass
+ public static void init() {
+ LocaleUtil.setUserLocale(Locale.US);
+ }
+
+ @AfterClass
+ public static void clear() {
+ LocaleUtil.setUserLocale(null);
+ }
+
@Test
public void testDateValue() {
confirmDateValue(new StringEval("2020-02-01"), 43862);
@@ -56,18 +68,13 @@ public final class TestDateValue {
confirmDateValueError(new StringEval("non-date text"));
- LocaleUtil.setUserLocale(Locale.ENGLISH);
- try {
- // // EXCEL
- confirmDateValue(new StringEval("8/22/2011"), 40777); // Serial number of a date entered as text.
- confirmDateValue(new StringEval("22-MAY-2011"), 40685); // Serial number of a date entered as text.
- confirmDateValue(new StringEval("2011/02/23"), 40597); // Serial number of a date entered as text.
+ // // EXCEL
+ confirmDateValue(new StringEval("8/22/2011"), 40777); // Serial number of a date entered as text.
+ confirmDateValue(new StringEval("22-MAY-2011"), 40685); // Serial number of a date entered as text.
+ confirmDateValue(new StringEval("2011/02/23"), 40597); // Serial number of a date entered as text.
- // LibreOffice compatibility
- confirmDateValue(new StringEval("1954-07-20"), 19925);
- } finally {
- LocaleUtil.setUserLocale(null);
- }
+ // LibreOffice compatibility
+ confirmDateValue(new StringEval("1954-07-20"), 19925);
}
private ValueEval invokeDateValue(ValueEval text) {