From: Andreas Beeker Date: Sun, 13 Dec 2020 15:32:43 +0000 (+0000) Subject: #64979 - Change artifact names of poi-/ooxml-schemas X-Git-Tag: before_junit5_update~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c8940e7d1e24ef75481461102bf417e7920dc2e5;p=poi.git #64979 - Change artifact names of poi-/ooxml-schemas git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884381 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/.classpath b/.classpath index 210a5651ef..5f16a42678 100644 --- a/.classpath +++ b/.classpath @@ -18,12 +18,11 @@ - + - - + diff --git a/.gitignore b/.gitignore index ffb9ae397f..31a3d896b4 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ TEST-org.apache.poi*.xml sonar/main/src/ sonar/ooxml/src/ sonar/scratchpad/src/ -sonar/ooxml-schema-security/src/ +sonar/ooxml-full/src/ sonar/examples/src/ sonar/excelant/src/ sonar/target diff --git a/README.rst b/README.rst index 59dd693a97..1c1b5027ee 100644 --- a/README.rst +++ b/README.rst @@ -87,7 +87,7 @@ Contributing Building jar files ------------------ -To build the jar files for poi, poi-ooxml, poi-ooxml-schemas, and poi-examples:: +To build the jar files for poi, poi-ooxml, poi-ooxml-lite, poi-ooxml-full and poi-examples:: ant jar diff --git a/build.gradle b/build.gradle index df43dffc5f..f44ded54e9 100644 --- a/build.gradle +++ b/build.gradle @@ -302,7 +302,7 @@ project('ooxml') { compile project(':main') compile project(':scratchpad') // TODO: get rid of this dependency! - compile files('../../build/dist/maven/ooxml-schemas/ooxml-schemas-1.5.jar') + compile files('../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar') testCompile "junit:junit:${junitVersion}" testCompile "org.mockito:mockito-core:${mockitoVersion}" @@ -338,7 +338,7 @@ project('examples') { compile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" - compile files('../../build/dist/maven/ooxml-schemas/ooxml-schemas-1.5.jar') + compile files('../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar') compile "org.apache.commons:commons-compress:${commonsCompressVersion}" } @@ -385,7 +385,7 @@ project('integrationtest') { testCompile "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}" - testCompile files('../../build/dist/maven/ooxml-schemas/ooxml-schemas-1.5.jar') + testCompile files('../../build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version}.jar') testCompile files(this.project(':ooxml').sourceSets.test.runtimeClasspath) } diff --git a/build.xml b/build.xml index d7d5ae12cb..f5333c4a75 100644 --- a/build.xml +++ b/build.xml @@ -160,7 +160,7 @@ under the License. - + @@ -328,8 +328,8 @@ under the License. - - + + @@ -467,7 +467,7 @@ under the License. - + @@ -856,8 +856,8 @@ under the License. - + - + @@ -887,7 +887,7 @@ under the License. - + @@ -1090,7 +1090,7 @@ under the License. - + @@ -1107,7 +1107,7 @@ under the License. - + @@ -1208,12 +1208,12 @@ under the License. + description="run ooxml tests with poi-ooxml-lite"> - + @@ -1290,7 +1290,7 @@ under the License. unless:true="${isJava8}"> - + @@ -1574,7 +1574,7 @@ under the License. description="test OOXML classes"> - + @@ -1611,7 +1611,7 @@ under the License. - + @@ -1662,7 +1662,7 @@ under the License. - + @@ -1741,7 +1741,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectelement.xsb org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - + @@ -1750,7 +1750,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - + @@ -1760,11 +1760,11 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - + - + @@ -1803,7 +1803,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - + @@ -2002,11 +2002,11 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - - + + - + @@ -2042,7 +2042,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - + @@ -2299,10 +2299,9 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - - + + - @@ -2623,7 +2622,8 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb - + + diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy index 9c3773cd9d..4cd8ffac7e 100644 --- a/jenkins/create_jobs.groovy +++ b/jenkins/create_jobs.groovy @@ -323,10 +323,6 @@ poijobs.each { poijob -> localRepository(LocalRepositoryLocation.LOCAL_TO_WORKSPACE) mavenInstallation(defaultMaven) } - /* Currently not done, let's see if it is still necessary: - # Maven-Download fails for strange reasons, try to workaround... - mkdir -p sonar/ooxml-schema-security/target/schemas && wget -O sonar/ooxml-schema-security/target/schemas/xmldsig-core-schema.xsd http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd - */ maven { if (poijob.sonar) { goals('clean package sonar:sonar') diff --git a/legal/LICENSE b/legal/LICENSE index 3b63d08dd5..075eb122b1 100644 --- a/legal/LICENSE +++ b/legal/LICENSE @@ -209,7 +209,7 @@ license terms. Your use of these subcomponents is subject to the terms and conditions of the following licenses: -Office Open XML schemas (ooxml-schemas-1.*.jar) +Office Open XML schemas (poi-ooxml-full-*.jar) The Office Open XML schema definitions used by Apache POI are a part of the Office Open XML ECMA Specification (ECMA-376, [1]). @@ -268,7 +268,7 @@ JUnit test library (junit-4.*.jar) & JaCoCo (*jacoco*) b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; - where such changes and/or additions to the Program originate from and are + where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include @@ -491,7 +491,7 @@ Hamcrest library (hamcrest-*.jar) & CuvesAPI / Curve API SLF4J library (slf4j-api-*.jar) Copyright (c) 2004-2013 QOS.ch - All rights reserved. + All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -515,19 +515,19 @@ SLF4J library (slf4j-api-*.jar) inbot-utils (https://github.com/Inbot/inbot-utils) The MIT License (MIT) - + Copyright (c) 2015 Inbot - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/maven/multisign.sh b/maven/multisign.sh deleted file mode 100755 index 1ba8c91f46..0000000000 --- a/maven/multisign.sh +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# create md5 checksums and gpg signatures - -echo "If you use gpg2 you need to set GPG_BIN accordingly" - -GPG_BIN=gpg - -stty -echo -echo "enter your GPG passphrase" -read passphrase -stty echo - -# Do we have md5sum and sha1sum? -# (We can use openssl if not, but the files it produces aren't as nice) -which md5sum > /dev/null -LACKING_MD5SUM=$? -which sha1sum > /dev/null -LACKING_SHA1SUM=$? - -for i in *; do - echo "" - echo Signing $i - echo $passphrase | $GPG_BIN --passphrase-fd 0 --output $i.asc --detach-sig --armor $i - $GPG_BIN --verify $i.asc $i - echo Hashing $i - - if [ "$LACKING_MD5SUM" = "1" ]; then - openssl md5 < $i > $i.md5 - else - md5sum $i > $i.md5 - fi - - if [ "$LACKING_SHA1SUM" = "1" ]; then - openssl sha1 < $i > $i.sha1 - else - sha1sum $i > $i.sha1 - fi -done diff --git a/maven/mvn-deploy.sh b/maven/mvn-deploy.sh deleted file mode 100755 index a66936a136..0000000000 --- a/maven/mvn-deploy.sh +++ /dev/null @@ -1,62 +0,0 @@ -#! /bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Shell script to deploy POI artifacts in a maven repository. -# -# Note, You should configure your settings.xml and add a server with id=apache-releases: -# -# -# apache-releases -# apacheId -# mySecurePassw0rd -# -# -# -# -# apache-releases -# -# -# -# -# -# -# Usage: -# 1. ant dist -# 2. cd build/dist -# 3. ./mvn-deploy.sh - -M2_REPOSITORY=https://repository.apache.org/service/local/staging/deploy/maven2 - -VERSION=@VERSION@ -DSTAMP=@DSTAMP@ - -for artifactId in poi poi-scratchpad poi-ooxml poi-examples poi-ooxml-schemas poi-excelant -do - SENDS="-Dfile=$artifactId-$VERSION-$DSTAMP.jar" - SENDS="$SENDS -DpomFile=$artifactId-$VERSION.pom" - if [ -r $artifactId-$VERSION-sources-$DSTAMP.jar ]; then - SENDS="$SENDS -Dsources=$artifactId-$VERSION-sources-$DSTAMP.jar" - fi - if [ -r $artifactId-$VERSION-javadocs-$DSTAMP.jar ]; then - SENDS="$SENDS -Djavadoc=$artifactId-$VERSION-javadocs-$DSTAMP.jar" - fi - - mvn gpg:sign-and-deploy-file \ - -DrepositoryId=apache-releases -P apache-releases \ - -Durl=$M2_REPOSITORY \ - $SENDS -done diff --git a/maven/ooxml-schemas.pom b/maven/ooxml-schemas.pom deleted file mode 100644 index 2a3116cdb4..0000000000 --- a/maven/ooxml-schemas.pom +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - 4.0.0 - org.apache.poi - ooxml-schemas - @VERSION@ - jar - OOXML schemas - XmlBeans generated from the Ecma supplied xsds: - http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%20Part%204%20(DOCX).zip - https://poi.apache.org/ - - - - 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/ - - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - Apache Software Foundation - http://www.apache.org/ - - - - - org.apache.xmlbeans - xmlbeans - 4.0.0 - - - diff --git a/maven/poi-ooxml-full.pom b/maven/poi-ooxml-full.pom new file mode 100644 index 0000000000..d35d8f7ddc --- /dev/null +++ b/maven/poi-ooxml-full.pom @@ -0,0 +1,70 @@ + + + + + + 4.0.0 + org.apache.poi + poi-ooxml-full + @VERSION@ + jar + Apache POI - OOXML schemas (full) + XmlBeans generated from the Ecma supplied xsds (since POI 5.0.0, the 3rd edition is used): + https://www.ecma-international.org/publications/standards/Ecma-376.htm + https://poi.apache.org/ + + + + 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/ + + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + Apache Software Foundation + http://www.apache.org/ + + + + + org.apache.xmlbeans + xmlbeans + 4.0.0 + + + diff --git a/maven/poi-ooxml-lite.pom b/maven/poi-ooxml-lite.pom new file mode 100644 index 0000000000..5b0ffdc071 --- /dev/null +++ b/maven/poi-ooxml-lite.pom @@ -0,0 +1,76 @@ + + + + + + 4.0.0 + org.apache.poi + poi-ooxml-lite + @VERSION@ + jar + Apache POI - OOXML Schemas (lite) + https://poi.apache.org/ + Apache POI - Java API To Access Microsoft Format Files + + + + apache-releases-repo + apache releases repo + https://repository.apache.org/content/repositories/releases + + + + + + 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/ + + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + Apache Software Foundation + http://www.apache.org/ + + + + + org.apache.xmlbeans + xmlbeans + 4.0.0 + + + diff --git a/maven/poi-ooxml-schemas.pom b/maven/poi-ooxml-schemas.pom deleted file mode 100644 index 7ae6765394..0000000000 --- a/maven/poi-ooxml-schemas.pom +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - 4.0.0 - org.apache.poi - poi-ooxml-schemas - @VERSION@ - jar - Apache POI - https://poi.apache.org/ - Apache POI - Java API To Access Microsoft Format Files - - - - apache-releases-repo - apache releases repo - https://repository.apache.org/content/repositories/releases - - - - - - 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/ - - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - - Apache Software Foundation - http://www.apache.org/ - - - - - org.apache.xmlbeans - xmlbeans - 4.0.0 - - - diff --git a/maven/poi-ooxml.pom b/maven/poi-ooxml.pom index 1d52791c4d..4045e19ca2 100644 --- a/maven/poi-ooxml.pom +++ b/maven/poi-ooxml.pom @@ -24,7 +24,7 @@ poi-ooxml @VERSION@ jar - Apache POI + Apache POI - API based on OPC and OOXML schemas https://poi.apache.org/ Apache POI - Java API To Access Microsoft Format Files @@ -63,7 +63,7 @@ org.apache.poi - poi-ooxml-schemas + poi-ooxml-lite @VERSION@ diff --git a/osgi/pom.xml b/osgi/pom.xml index 99a1bba145..0d19cd3341 100644 --- a/osgi/pom.xml +++ b/osgi/pom.xml @@ -96,7 +96,7 @@ poi;inline=true, poi-scratchpad;inline=true, poi-ooxml;inline=true, - poi-ooxml-schemas;inline=true, + poi-ooxml-lite;inline=true, xmlbeans;inline=true, SparseBitSet, curvesapi, @@ -150,7 +150,7 @@ org.apache.poi - poi-ooxml-schemas + poi-ooxml-lite ${poi.version} diff --git a/sonar/ooxml-full/pom.xml b/sonar/ooxml-full/pom.xml new file mode 100644 index 0000000000..6597541a20 --- /dev/null +++ b/sonar/ooxml-full/pom.xml @@ -0,0 +1,156 @@ + + 4.0.0 + + org.apache.poi + poi-parent + 5.0.0-SNAPSHOT + .. + + poi-ooxml-lite + jar + + Apache POI - Openxmlformats Schema package + + + + target/generated-sources/* + true + + + + + + maven-antrun-plugin + ${maven.plugin.antrun.version} + + + copy-xmltype-and-xsdconfig + generate-sources + + run + + + + + + + + + + + + + + + + + + + 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-full/java9 + META-INF/versions/9 + + *.class + + + + + ${basedir}/target/generated-sources + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + + true + org.apache.poi.ooxml.schemas + + + + + + + + + + ${project.groupId} + poi-main + ${project.version} + + + ${project.groupId} + poi-scratchpad + ${project.version} + + + org.apache.xmlbeans + xmlbeans + ${xmlbeans.version} + + + diff --git a/sonar/ooxml-full/xmlbeans.marker b/sonar/ooxml-full/xmlbeans.marker new file mode 100644 index 0000000000..2744493ace --- /dev/null +++ b/sonar/ooxml-full/xmlbeans.marker @@ -0,0 +1 @@ +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 deleted file mode 100644 index b65bf6168a..0000000000 --- a/sonar/ooxml-schema/pom.xml +++ /dev/null @@ -1,156 +0,0 @@ - - 4.0.0 - - org.apache.poi - poi-parent - 5.0.0-SNAPSHOT - .. - - poi-ooxml-schema - jar - - Apache POI - Openxmlformats Schema package - - - - target/generated-sources/* - true - - - - - - maven-antrun-plugin - ${maven.plugin.antrun.version} - - - copy-xmltype-and-xsdconfig - generate-sources - - run - - - - - - - - - - - - - - - - - - - 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 - - - - - ${basedir}/target/generated-sources - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.0 - - - - true - org.apache.poi.ooxml.schemas - - - - - - - - - - ${project.groupId} - poi-main - ${project.version} - - - ${project.groupId} - poi-scratchpad - ${project.version} - - - org.apache.xmlbeans - xmlbeans - ${xmlbeans.version} - - - diff --git a/sonar/ooxml-schema/xmlbeans.marker b/sonar/ooxml-schema/xmlbeans.marker deleted file mode 100644 index 2744493ace..0000000000 --- a/sonar/ooxml-schema/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/pom.xml b/sonar/ooxml/pom.xml index 883ba084eb..966b3becba 100644 --- a/sonar/ooxml/pom.xml +++ b/sonar/ooxml/pom.xml @@ -102,7 +102,7 @@ ${project.groupId} - poi-ooxml-schema + poi-ooxml-lite ${project.version} diff --git a/sonar/pom.xml b/sonar/pom.xml index 7a5f429f8f..1c0ecea23b 100644 --- a/sonar/pom.xml +++ b/sonar/pom.xml @@ -57,7 +57,7 @@ main - ooxml-schema + ooxml-full ooxml scratchpad excelant @@ -118,6 +118,7 @@ + false ../../test-data true diff --git a/src/examples/scala/build.sbt b/src/examples/scala/build.sbt index a9b3ce45c1..598dc28951 100644 --- a/src/examples/scala/build.sbt +++ b/src/examples/scala/build.sbt @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ - + // Add the POI core and OOXML support dependencies into your build.sbt libraryDependencies ++= Seq( - "org.apache.poi" % "poi" % "4.1.2", - "org.apache.poi" % "poi-ooxml" % "4.1.2", - "org.apache.poi" % "poi-ooxml-schemas" "4.1.2", + "org.apache.poi" % "poi" % "5.0.0", + "org.apache.poi" % "poi-ooxml" % "5.0.0", + "org.apache.poi" % "poi-ooxml-lite" "5.0.0", ) diff --git a/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java index 2a67f8f5df..4b9e51e1d1 100644 --- a/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java +++ b/src/examples/src/org/apache/poi/examples/xwpf/usermodel/SimpleTable.java @@ -41,10 +41,10 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc; /** * This program creates a simple WordprocessingML table using POI XWPF API, and - * a more complex, styled table using both XWPF and ooxml-schema. It's possible - * that not all referenced wordprocessingml classes are defined in - * poi-ooxml-schemas-3.8-beta4. If this is the case, you'll need to use the full - * ooxml-schemas.jar library. + * a more complex, styled table using both XWPF and poi-ooxml-full. It's possible + * that not all referenced wordprocessingml classes are defined in the + * poi-ooxml-lite jar. If this is the case, you'll need to use the + * poi-ooxml-full jar library. * * @author gisella bronzetti (original) * @author Gregg Morris (styled table) diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java index 16f2e5ff8e..4fc7a80508 100644 --- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java +++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java @@ -32,20 +32,20 @@ import org.apache.tools.ant.Task; * Ant task class for testing Excel workbook cells. */ public class ExcelAntTask extends Task { - + public static final String VERSION = "0.5.0" ; - + private String excelFileName ; - + private boolean failOnError; - + private ExcelAntWorkbookUtil workbookUtil ; - + private ExcelAntPrecision precision ; - + private LinkedList tests ; private LinkedList functions ; - + public ExcelAntTask() { tests = new LinkedList<>() ; functions = new LinkedList<>() ; @@ -54,29 +54,29 @@ public class ExcelAntTask extends Task { public void addPrecision( ExcelAntPrecision prec ) { precision = prec ; } - + public void setFailOnError( boolean value ) { failOnError = value ; } public void setFileName( String fileName ) { excelFileName = fileName ; } - + public void addTest( ExcelAntTest testElement ) { tests.add( testElement ) ; } - + public void addUdf( ExcelAntUserDefinedFunction def ) { functions.add( def ) ; } - + @Override public void execute() throws BuildException { checkClassPath(); int totalCount = 0 ; int successCount = 0 ; - + StringBuilder versionBffr = new StringBuilder() ; versionBffr.append( "ExcelAnt version " ) ; versionBffr.append( VERSION ) ; @@ -88,11 +88,11 @@ public class ExcelAntTask extends Task { versionBffr.append( currYear ) ; } log( versionBffr.toString(), Project.MSG_INFO ) ; - + log( "Using input file: " + excelFileName, Project.MSG_INFO ) ; workbookUtil = ExcelAntWorkbookUtilFactory.getInstance(excelFileName); - + for (ExcelAntTest test : tests) { log("executing test: " + test.getName(), Project.MSG_DEBUG); @@ -133,7 +133,7 @@ public class ExcelAntTask extends Task { } workbookUtil = null; } - + /** * ExcelAnt depends on external libraries not included in the Ant distribution. @@ -147,7 +147,7 @@ public class ExcelAntTask extends Task { throw new BuildException( "The for must include poi.jar and poi-ooxml.jar " + "if not in Ant's own classpath. Processing .xlsx spreadsheets requires " + - "additional poi-ooxml-schemas.jar, xmlbeans.jar" , + "additional poi-ooxml-lite.jar, xmlbeans.jar" , e, getLocation()); } diff --git a/src/integrationtest/build.xml b/src/integrationtest/build.xml index b334d2a7f4..263a3810c2 100644 --- a/src/integrationtest/build.xml +++ b/src/integrationtest/build.xml @@ -86,7 +86,7 @@ Before running this, you should execute the "assemble" target in the main build. - + @@ -129,7 +129,7 @@ Before running this, you should execute the "assemble" target in the main build. - + diff --git a/src/multimodule/ooxml-full/java9/module-info.class b/src/multimodule/ooxml-full/java9/module-info.class new file mode 100644 index 0000000000..2bbf982025 Binary files /dev/null and b/src/multimodule/ooxml-full/java9/module-info.class differ diff --git a/src/multimodule/ooxml-full/java9/module-info.java b/src/multimodule/ooxml-full/java9/module-info.java new file mode 100644 index 0000000000..102ab6ad69 --- /dev/null +++ b/src/multimodule/ooxml-full/java9/module-info.java @@ -0,0 +1,61 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + + +open module org.apache.poi.ooxml.schemas { + // this still throws "requires transitive directive for an automatic module" in JDK 14 + // see https://bugs.openjdk.java.net/browse/JDK-8240847 + requires transitive org.apache.xmlbeans; + requires java.xml; + exports com.microsoft.schemas.compatibility; + exports com.microsoft.schemas.office.excel; + exports com.microsoft.schemas.office.office; + exports com.microsoft.schemas.office.powerpoint; + exports com.microsoft.schemas.office.visio.x2012.main; + exports com.microsoft.schemas.office.word; + exports com.microsoft.schemas.vml; + exports org.openxmlformats.schemas.drawingml.x2006.chart; + exports org.openxmlformats.schemas.drawingml.x2006.chartDrawing; + exports org.openxmlformats.schemas.drawingml.x2006.compatibility; + exports org.openxmlformats.schemas.drawingml.x2006.diagram; + exports org.openxmlformats.schemas.drawingml.x2006.lockedCanvas; + exports org.openxmlformats.schemas.drawingml.x2006.main; + exports org.openxmlformats.schemas.drawingml.x2006.picture; + exports org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing; + exports org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing; + exports org.openxmlformats.schemas.officeDocument.x2006.bibliography; + exports org.openxmlformats.schemas.officeDocument.x2006.characteristics; + exports org.openxmlformats.schemas.officeDocument.x2006.customProperties; + exports org.openxmlformats.schemas.officeDocument.x2006.customXml; + exports org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes; + exports org.openxmlformats.schemas.officeDocument.x2006.extendedProperties; + exports org.openxmlformats.schemas.officeDocument.x2006.math; + exports org.openxmlformats.schemas.officeDocument.x2006.relationships; + exports org.openxmlformats.schemas.presentationml.x2006.main; + exports org.openxmlformats.schemas.schemaLibrary.x2006.main; + exports org.openxmlformats.schemas.spreadsheetml.x2006.main; + exports org.openxmlformats.schemas.wordprocessingml.x2006.main; + + exports com.microsoft.schemas.office.x2006.digsig; + exports org.etsi.uri.x01903.v13; + exports org.etsi.uri.x01903.v14; + exports org.openxmlformats.schemas.xpackage.x2006.digitalSignature; + exports org.openxmlformats.schemas.xpackage.x2006.relationships; + exports org.w3.x2000.x09.xmldsig; + + exports org.apache.poi.schemas.vmldrawing; +} \ No newline at end of file diff --git a/src/multimodule/ooxml-schemas/java9/module-info.class b/src/multimodule/ooxml-schemas/java9/module-info.class deleted file mode 100644 index 2bbf982025..0000000000 Binary files a/src/multimodule/ooxml-schemas/java9/module-info.class and /dev/null differ diff --git a/src/multimodule/ooxml-schemas/java9/module-info.java b/src/multimodule/ooxml-schemas/java9/module-info.java deleted file mode 100644 index 102ab6ad69..0000000000 --- a/src/multimodule/ooxml-schemas/java9/module-info.java +++ /dev/null @@ -1,61 +0,0 @@ -/* ==================================================================== - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -==================================================================== */ - - -open module org.apache.poi.ooxml.schemas { - // this still throws "requires transitive directive for an automatic module" in JDK 14 - // see https://bugs.openjdk.java.net/browse/JDK-8240847 - requires transitive org.apache.xmlbeans; - requires java.xml; - exports com.microsoft.schemas.compatibility; - exports com.microsoft.schemas.office.excel; - exports com.microsoft.schemas.office.office; - exports com.microsoft.schemas.office.powerpoint; - exports com.microsoft.schemas.office.visio.x2012.main; - exports com.microsoft.schemas.office.word; - exports com.microsoft.schemas.vml; - exports org.openxmlformats.schemas.drawingml.x2006.chart; - exports org.openxmlformats.schemas.drawingml.x2006.chartDrawing; - exports org.openxmlformats.schemas.drawingml.x2006.compatibility; - exports org.openxmlformats.schemas.drawingml.x2006.diagram; - exports org.openxmlformats.schemas.drawingml.x2006.lockedCanvas; - exports org.openxmlformats.schemas.drawingml.x2006.main; - exports org.openxmlformats.schemas.drawingml.x2006.picture; - exports org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing; - exports org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing; - exports org.openxmlformats.schemas.officeDocument.x2006.bibliography; - exports org.openxmlformats.schemas.officeDocument.x2006.characteristics; - exports org.openxmlformats.schemas.officeDocument.x2006.customProperties; - exports org.openxmlformats.schemas.officeDocument.x2006.customXml; - exports org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes; - exports org.openxmlformats.schemas.officeDocument.x2006.extendedProperties; - exports org.openxmlformats.schemas.officeDocument.x2006.math; - exports org.openxmlformats.schemas.officeDocument.x2006.relationships; - exports org.openxmlformats.schemas.presentationml.x2006.main; - exports org.openxmlformats.schemas.schemaLibrary.x2006.main; - exports org.openxmlformats.schemas.spreadsheetml.x2006.main; - exports org.openxmlformats.schemas.wordprocessingml.x2006.main; - - exports com.microsoft.schemas.office.x2006.digsig; - exports org.etsi.uri.x01903.v13; - exports org.etsi.uri.x01903.v14; - exports org.openxmlformats.schemas.xpackage.x2006.digitalSignature; - exports org.openxmlformats.schemas.xpackage.x2006.relationships; - exports org.w3.x2000.x09.xmldsig; - - exports org.apache.poi.schemas.vmldrawing; -} \ No newline at end of file diff --git a/src/ooxml/java/org/apache/poi/ooxml/util/XPathHelper.java b/src/ooxml/java/org/apache/poi/ooxml/util/XPathHelper.java index 0e1700317f..cd4b25da2b 100644 --- a/src/ooxml/java/org/apache/poi/ooxml/util/XPathHelper.java +++ b/src/ooxml/java/org/apache/poi/ooxml/util/XPathHelper.java @@ -40,7 +40,7 @@ public final class XPathHelper { "Schemas (*.xsb) for can't be loaded - usually this happens when OSGI " + "loading is used and the thread context classloader has no reference to " + "the xmlbeans classes - please either verify if the .xsb is on the " + - "classpath or alternatively try to use the full ooxml-schemas-x.x.jar"; + "classpath or alternatively try to use the poi-ooxml-full-x.x.jar"; private static final String MC_NS = "http://schemas.openxmlformats.org/markup-compatibility/2006"; private static final String MAC_DML_NS = "http://schemas.microsoft.com/office/mac/drawingml/2008/main"; @@ -119,7 +119,7 @@ public final class XPathHelper { } // Pesky XmlBeans bug - see Bugzilla #49934 - // it never happens when using the full ooxml-schemas jar but may happen with the abridged poi-ooxml-schemas + // it never happens when using poi-ooxml-full jar but may happen with the abridged poi-ooxml-lite jar xo = innerCur.getObject(); if (xo instanceof XmlAnyTypeImpl) { String errorTxt = OSGI_ERROR @@ -169,7 +169,7 @@ public final class XPathHelper { alterCont = (AlternateContentDocument.AlternateContent)xo; } else { // Pesky XmlBeans bug - see Bugzilla #49934 - // it never happens when using the full ooxml-schemas jar but may happen with the abridged poi-ooxml-schemas + // it never happens when using poi-ooxml-full jar but may happen with the abridged poi-ooxml-lite jar if (!reparseAlternate) { throw new XmlException(OSGI_ERROR .replace("", "AlternateContent") diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java index f334052e81..df419014cd 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java @@ -68,7 +68,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable