From efd88b7f44b46514e66dae619d5dacd9b2c429b6 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Tue, 26 Mar 2019 16:40:26 -0400 Subject: [PATCH] Update readme and pom, add .travis.yml --- .travis-settings.xml | 9 +++ .travis.yml | 32 ++++++++ README.md | 24 ++++++ README.rst | 107 ------------------------- pom.xml | 121 +++++++++++++++++------------ src/test/java/CalculationTest.java | 1 + 6 files changed, 138 insertions(+), 156 deletions(-) create mode 100644 .travis-settings.xml create mode 100644 .travis.yml create mode 100644 README.md delete mode 100644 README.rst diff --git a/.travis-settings.xml b/.travis-settings.xml new file mode 100644 index 000000000..a9a9c68ea --- /dev/null +++ b/.travis-settings.xml @@ -0,0 +1,9 @@ + + + + sonatype-nexus-snapshots + ${env.SONATYPE_USERNAME} + ${env.SONATYPE_PASSWORD} + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..99dcc8e65 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: java +sudo: false + +matrix: + include: + - env: JDK='OpenJDK 7' + jdk: openjdk7 + - env: JDK='OpenJDK 8' + jdk: openjdk8 + - env: JDK='OpenJDK 9' + install: . ./install-jdk.sh -F 9 -L GPL + - env: JDK='OpenJDK 10' + install: . ./install-jdk.sh -F 10 -L GPL + - env: JDK='OpenJDK 11' + install: . ./install-jdk.sh -F 11 -L GPL + - env: JDK='OpenJDK 12' + install: . ./install-jdk.sh -F 12 -L GPL + script: mvn test -B -Djava.version=7 # java12 minimum target is 7, not 6 + - env: JDK='OpenJDK 13' + install: . ./install-jdk.sh -F 13 -L GPL + script: mvn test -B -Djava.version=7 # java13 minimum target is 7, not 6 + +before_install: wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh + +after_success: + - if [[ "${JDK}" == 'OpenJDK 7' ]]; then + mvn deploy --settings .travis-settings.xml -Dmaven.test.skip=true -B || travis_terminate 1; + fi + +cache: + directories: + - $HOME/.m2 diff --git a/README.md b/README.md new file mode 100644 index 000000000..7ed51a096 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +POI Fast Calc +====================== + +[![Travis-CI Build Status](https://api.travis-ci.org/moparisthebest/poi.svg?branch=master)](https://travis-ci.org/moparisthebest/poi) + +A Java library to calculate Excel formulas quickly. + +This is a fork of [Apache POI](https://poi.apache.org/) version [3.16](https://github.com/apache/poi/tree/REL_3_16_FINAL) +that serves simply to calculate formulas quickly, it supports XLSX (Excel 2007) row/column limits in the HSSF engine for +much faster evaluation than XML-backed XSSF is capable of, with the drawback that it can't read or write XLS/XLSX files +from or to disk. Read the [email thread](https://lists.apache.org/thread.html/0bc90a3ed386edddfcb9b93ce6c262ad145a6b0433d0fcfe70ef10a2@%3Cdev.poi.apache.org%3E) +with my original proposed patch to upstream poi for background. + +To use, add this to your maven pom.xml: +```xml + + com.moparisthebest.poi + poi-fast-calc + 3.16-SNAPSHOT + +``` + +The `org.apache.poi` package has been renamed `com.moparisthebest.poi` and all dependencies removed, +so this can cleanly live aside modern/newer upstream poi forever, and shouldn't ever need to change. diff --git a/README.rst b/README.rst deleted file mode 100644 index 4e6e4abbe..000000000 --- a/README.rst +++ /dev/null @@ -1,107 +0,0 @@ - -Apache POI -====================== - -A Java library for reading and writing Microsoft Office binary and OOXML file formats. - -The Apache POI Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and OLE2 formats and welcome others to participate. - -OLE2 files include most Microsoft Office files such as XLS, DOC, and PPT as well as MFC serialization API based file formats. The project provides APIs for the OLE2 Filesystem (POIFS) and OLE2 Document Properties (HPSF). - -Office OpenXML Format is the new standards based XML file format found in Microsoft Office 2007 and 2008. This includes XLSX, DOCX and PPTX. The project provides a low level API to support the Open Packaging Conventions using openxml4j. - -For each MS Office application there exists a component module that attempts to provide a common high level Java api to both OLE2 and OOXML document formats. This is most developed for Excel workbooks (SS=HSSF+XSSF). Work is progressing for Word documents (WP=HWPF+XWPF) and PowerPoint presentations (SL=HSLF+XSLF). - -The project has some support for Outlook (HSMF). Microsoft opened the specifications to this format in October 2007. We would welcome contributions. - -There are also projects for Visio (HDGF and XDGF), TNEF (HMEF), and Publisher (HPBF). - -This library includes the following components, roughly in descending order of maturity: - -* Excel spreadsheets (Common SS = HSSF, XSSF, and SXSSF) -* PowerPoint slideshows (Common SL = HSLF and XSLF) -* Word processing documents (Common WP = HWPF and XWPF) -* Outlook email (HSMF and HMEF) -* Visio diagrams (HDGF and XDGF) -* Publisher (HPBF) - -And lower-level, supporting components: - -* OLE2 Filesystem (POIFS) -* OLE2 Document Properties (HPSF) -* TNEF (HMEF) for Outlook winmail.dat files -* OpenXML4J (OOXML) - -| Components named H??F are for reading or writing OLE2 binary formats. -| Components named X??F are for reading or writing OpenOffice XML (OOXML) formats. - -Getting started ------------------- - -Website: https://poi.apache.org/ - -`Mailing lists`_: - -* `Developers`_ -* `Users`_ -* `General`_ (release announcements) - -Bug tracker: - -* `Bugzilla`_ -* `GitHub pull requests`_ - -Source code: - -* Official `Apache Subversion repo`_ at apache.org -* `ViewVC repo browser`_ at apache.org -* Official `Apache git mirror`_ at apache.org -* Unofficial `GitHub git mirror`_ at github.com - -Requires Java 1.6 or later. - -Contributing ------------------- - -* Download and install svn or git, Java JDK 1.6+, and Apache Ant 1.8+ or Gradle - -* Check out the code from svn or git - -* Import the project into Eclipse or your favorite IDE - -* Write a unit test: - - * Binary formats and Common APIs: src/testcases/org/apache/poi/ - * OOXML APIs only: src/ooxml/testcases/org/apache/poi/ - * Scratchpad (Binary formats): src/scratchpad/testcases/org/apache/poi/ - * test files: test-data/ - -* Navigate the source, make changes, and run unit tests to verify - - * Binary formats and Common APIs: src/java/org/apache/poi/ - * OOXML APIs only: src/ooxml/java/org/apache/poi/ - * Scratchpad (Binary formats): src/scratchpad/src/org/apache/poi/ - * Examples: src/examples/src/org/apache/poi/ - - -Building jar files ------------------- - -To build the jar files for poi, poi-ooxml, poi-ooxml-schemas, and poi-examples:: - - ant jar - - -.. _Mailing lists: https://poi.apache.org/mailinglists.html -.. _Developers: https://lists.apache.org/list.html?dev@poi.apache.org -.. _Users: https://lists.apache.org/list.html?user@poi.apache.org -.. _General: https://lists.apache.org/list.html?general@poi.apache.org -.. _Bugzilla: https://bz.apache.org/bugzilla/buglist.cgi?product=POI -.. _GitHub pull requests: https://github.com/apache/poi/pulls - -.. _Apache Subversion repo: https://svn.apache.org/repos/asf/poi/trunk -.. _ViewVC repo browser: https://svn.apache.org/viewvc/poi/trunk -.. _Apache git mirror: https://git.apache.org/poi.git/ -.. _GitHub git mirror: https://github.com/apache/poi - - diff --git a/pom.xml b/pom.xml index a2d921605..3d7ffb738 100644 --- a/pom.xml +++ b/pom.xml @@ -21,60 +21,83 @@ + + org.sonatype.oss + oss-parent + 9 + + 4.0.0 + com.moparisthebest.poi + poi-fast-calc + 3.16-SNAPSHOT + jar + POI Fast Calc + https://code.moparisthebest.com/moparisthebest/poi + POI Fast Calc - Java API To Calculate Excel formulas quickly - 4.0.0 - com.moparisthebest.poi - poi-fast-calc - 3.16 - jar - Apache POI - http://poi.apache.org/ - Apache POI - Java API To Access Microsoft Format Files + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + - - - POI Users List - user-subscribe@poi.apache.org - user-unsubscribe@poi.apache.org - http://mail-archives.apache.org/mod_mbox/poi-user/ - - - POI Developer List - dev-subscribe@poi.apache.org - dev-unsubscribe@poi.apache.org - http://mail-archives.apache.org/mod_mbox/poi-dev/ - - + + moparisthebest.com + https://www.moparisthebest.com + - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - + + scm:git:https://code.moparisthebest.com/moparisthebest/poi.git + scm:git:https://code.moparisthebest.com/moparisthebest/poi.git + https://code.moparisthebest.com/moparisthebest/poi + - - Apache Software Foundation - http://www.apache.org/ - - - - 1.6 - utf8 - ${java.version} - ${java.version} - + + 1.6 + ${java.version} + ${java.version} - - - junit - junit - test - 4.12 - - + UTF-8 + false + true - + + -Xmx4096m + - + + + junit + junit + test + 4.12 + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.1 + + true + true + ${test.argLine} + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.5 + true + + ossrh + https://oss.sonatype.org/ + true + + + + diff --git a/src/test/java/CalculationTest.java b/src/test/java/CalculationTest.java index bdef638c4..2c18a1fa6 100644 --- a/src/test/java/CalculationTest.java +++ b/src/test/java/CalculationTest.java @@ -66,6 +66,7 @@ public class CalculationTest { final int maxRows = maxRow - 1; // because we created 1 above + System.gc(); // to clean up from previous runs before we start counting final long start = System.currentTimeMillis(); //rowNum = maxRow - 3;