#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
This commit is contained in:
Andreas Beeker 2020-12-13 15:32:43 +00:00
parent 83c6910dbd
commit c8940e7d1e
36 changed files with 124 additions and 243 deletions

View File

@ -18,12 +18,11 @@
<classpathentry kind="lib" path="lib/ant-1.10.1.jar"/>
<classpathentry kind="lib" path="lib/ant-launcher-1.10.1.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.17.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ooxml/xmlbeans-4.0.0.jar" sourcepath="lib/ooxml/xmlbeans-3.1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ooxml/xmlbeans-4.0.0.jar" sourcepath="lib/ooxml/xmlbeans-4.0.0-sources.jar"/>
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/junit-4.13.1.jar"/>
<classpathentry kind="lib" path="lib/ooxml/curvesapi-1.06.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ooxml/ooxml-schemas-1.4.jar" sourcepath="lib/ooxml/ooxml-schemas-1.4-sources.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ooxml/ooxml-security-1.1.jar" sourcepath="lib/ooxml/ooxml-security-1.1-sources.jar"/>
<classpathentry exported="true" kind="lib" path="build/dist/maven/poi-ooxml-full/poi-ooxml-full-5.0.0-SNAPSHOT.jar" sourcepath="build/xmlbean-sources"/>
<classpathentry kind="lib" path="lib/main-tests/jmh-core-1.26.jar"/>
<classpathentry kind="lib" path="lib/main-tests/jmh-generator-annprocess-1.26.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>

2
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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)
}

View File

@ -160,7 +160,7 @@ under the License.
<property name="ooxml.lite.agent" location="lib/ooxml-tests/ooxml-lite-agent.jar"/>
<property name="ooxml.lite.report" location="build/ooxml-lite-report.txt"/>
<property name="ooxml.lite.jar" location="build/dist/maven/poi-ooxml-schemas/poi-ooxml-schemas-${version.id}.jar"/>
<property name="ooxml.lite.jar" location="build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${version.id}.jar"/>
<property name="ooxml.lite.includes" value="^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"/>
@ -328,8 +328,8 @@ under the License.
<!-- "Copy these file(s), free of charge" -->
<property name="ooxml.xsds.izip.1" value="${basedir}/src/ooxml/resources/org/apache/poi/schemas/OfficeOpenXML-XMLSchema-Transitional.zip"/>
<property name="ooxml.xsds.src.dir" location="build/ooxml-xsds-src"/>
<property name="ooxml.xsds.src.jar" location="build/dist/maven/ooxml-schemas/ooxml-schemas-${maven.ooxml.xsds.version.id}-sources.jar"/>
<property name="ooxml.xsds.jar" location="build/dist/maven/ooxml-schemas/ooxml-schemas-${maven.ooxml.xsds.version.id}.jar"/>
<property name="ooxml.xsds.src.jar" location="build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version.id}-sources.jar"/>
<property name="ooxml.xsds.jar" location="build/dist/maven/poi-ooxml-full/poi-ooxml-full-${version.id}.jar"/>
<!-- additional schemas are packed into the poi schemas jar, -->
<!-- so we don't have to care about a separate versioning of the original ooxml schemas -->
@ -467,7 +467,7 @@ under the License.
</path>
<path id="ooxml.lite.verify.classpath">
<pathelement location="build/dist/maven/poi-ooxml-schemas/poi-ooxml-schemas-${version.id}.jar"/>
<pathelement location="build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${version.id}.jar"/>
<path refid="ooxml.base.classpath"/>
</path>
@ -856,8 +856,8 @@ under the License.
</javac>
<javac release="9"
srcdir="${basedir}/src/multimodule/ooxml-schemas/java9"
destdir="${basedir}/src/multimodule/ooxml-schemas/java9"
srcdir="${basedir}/src/multimodule/ooxml-full/java9"
destdir="${basedir}/src/multimodule/ooxml-full/java9"
includeantruntime="false"
fork="true"
modulepath="lib/ooxml"
@ -865,11 +865,11 @@ under the License.
<compilerarg line="--patch-module org.apache.poi.ooxml.schemas=${xmlbean.classes.dir}"/>
</javac>
<mkdir dir="build/dist/maven/ooxml-schemas"/>
<mkdir dir="build/dist/maven/poi-ooxml-full"/>
<jar destfile="${ooxml.xsds.jar}">
<fileset dir="${xmlbean.classes.dir}"/>
<zipfileset dir="${basedir}/src/multimodule/ooxml-schemas/java9" prefix="META-INF/versions/9" excludes="*.java"/>
<zipfileset dir="${basedir}/src/multimodule/ooxml-full/java9" prefix="META-INF/versions/9" excludes="*.java"/>
<metainf dir="legal/"/>
<manifest>
<attribute name="Multi-Release" value="true"/>
@ -887,7 +887,7 @@ under the License.
<jar destfile="${ooxml.xsds.src.jar}">
<fileset dir="${xmlbean.sources.dir}"/>
<zipfileset dir="${basedir}/src/multimodule/ooxml-schemas/java9" prefix="META-INF/versions/9/" excludes="*.class"/>
<zipfileset dir="${basedir}/src/multimodule/ooxml-full/java9" prefix="META-INF/versions/9/" excludes="*.class"/>
<metainf dir="legal"/>
</jar>
</target>
@ -1090,7 +1090,7 @@ under the License.
<compile-jar module="examples"
java="${examples.src}" classes="${examples.output.dir}">
<lib>
<pathelement path="build/dist/maven/ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-full"/>
<pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-scratchpad-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-tests"/>
@ -1107,7 +1107,7 @@ under the License.
<lib>
<pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-scratchpad-tests"/>
<pathelement path="build/dist/maven/ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-full"/>
<pathelement path="lib/main"/>
<pathelement path="lib/main-tests"/>
<pathelement path="lib/ooxml"/>
@ -1208,12 +1208,12 @@ under the License.
</macrodef>
<target name="retest-ooxml" depends="jar"
description="run ooxml tests with poi-ooxml-schemas (= lite schema)">
description="run ooxml tests with poi-ooxml-lite">
<path id="restest.modules">
<pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-scratchpad-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-lite"/>
<pathelement path="lib/main"/>
<pathelement path="lib/main-tests"/>
<pathelement path="lib/ooxml"/>
@ -1290,7 +1290,7 @@ under the License.
unless:true="${isJava8}">
<compilerarg line="--patch-module org.apache.poi.stress=${integration.output.test.dir}"/>
<modulepath>
<pathelement path="build/dist/maven/ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-full"/>
<pathelement path="build/dist/maven/poi"/>
<pathelement path="build/dist/maven/poi-ooxml"/>
<pathelement path="build/dist/maven/poi-scratchpad"/>
@ -1574,7 +1574,7 @@ under the License.
description="test OOXML classes">
<path id="test-ooxml.modules">
<!-- full schema -->
<pathelement path="build/dist/maven/ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-full"/>
<pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-tests"/>
<pathelement path="build/dist/maven/poi-scratchpad-tests"/>
@ -1611,7 +1611,7 @@ under the License.
<pathelement path="build/dist/maven/poi-ooxml"/>
<pathelement path="build/dist/maven/poi-scratchpad"/>
<pathelement path="build/dist/maven/poi-examples"/>
<pathelement path="build/dist/maven/ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-full"/>
<pathelement path="build/dist/maven/poi-integration"/>
<pathelement path="lib/main"/>
<pathelement path="lib/main-tests"/>
@ -1662,7 +1662,7 @@ under the License.
<local name="full.schema"/>
<loadresource property="full.schema">
<file file="${basedir}/src/multimodule/ooxml-schemas/java9/module-info.java"/>
<file file="${basedir}/src/multimodule/ooxml-full/java9/module-info.java"/>
<filterchain>
<linecontains negate="true" matchany="true">
<contains value="exports"/>
@ -1741,7 +1741,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectelement.xsb
org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
</echo>
<mkdir dir="build/dist/maven/poi-ooxml-schemas"/>
<mkdir dir="build/dist/maven/poi-ooxml-lite"/>
<jar destfile="${ooxml.lite.jar}" duplicate="preserve">
<zipfileset dir="${basedir}/src/multimodule/ooxml-lite/java9" prefix="META-INF/versions/9" excludes="*.java"/>
@ -1750,7 +1750,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
<include name="org/apache/poi/schemas/ooxml/element/**/*.xsb"/>
</patternset>
</zipfileset>
<zipfileset dir="src/multimodule/ooxml-schemas/java9" prefix="META-INF/versions/9" excludes="*.java"/>
<zipfileset dir="src/multimodule/ooxml-full/java9" prefix="META-INF/versions/9" excludes="*.java"/>
<manifest>
<attribute name="Multi-Release" value="true"/>
<attribute name="Automatic-Module-Name" value="org.apache.poi.ooxml.schemas"/>
@ -1760,11 +1760,11 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
<target name="test-ooxml-lite" depends="jacocotask,compile-ooxml-lite">
<delete file="${ooxml.testokfile}"/>
<echo message="Running ooxml tests against 'poi-ooxml-schemas'"/>
<echo message="Running ooxml tests against 'poi-ooxml-lite'"/>
<path id="test-ooxml-lite.modules">
<!-- lite schema -->
<pathelement path="build/dist/maven/poi-ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-lite"/>
<pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-tests"/>
<pathelement path="build/dist/maven/poi-scratchpad-tests"/>
@ -1803,7 +1803,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
<pathelement path="lib/excelant"/>
<pathelement path="build/dist/maven/poi-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-tests"/>
<pathelement path="build/dist/maven/poi-ooxml-schemas"/>
<pathelement path="build/dist/maven/poi-ooxml-lite"/>
<pathelement path="build/dist/maven/poi-scratchpad-tests"/>
<pathelement path="build/dist/maven/poi-excelant-tests"/>
</path>
@ -2002,11 +2002,11 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
</filterchain>
</copy>
<mkdir dir="${dist.dir}/maven/ooxml-schemas"/>
<copy tofile="${dist.dir}/maven/ooxml-schemas/ooxml-schemas-${maven.ooxml.xsds.version.id}.pom" file="maven/ooxml-schemas.pom">
<mkdir dir="${dist.dir}/maven/poi-ooxml-full"/>
<copy tofile="${dist.dir}/maven/poi-ooxml-full/poi-ooxml-full-${version.id}.pom" file="maven/poi-ooxml-full.pom">
<filterchain>
<replacetokens>
<token key="VERSION" value="${maven.ooxml.xsds.version.id}"/>
<token key="VERSION" value="${version.id}"/>
</replacetokens>
</filterchain>
</copy>
@ -2042,7 +2042,7 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
<chainedmapper>
<filtermapper>
<replaceregex pattern=".jar" replace="" flags="g"/>
<replaceregex pattern="ooxml-lite" replace="ooxml-schemas" flags="g"/>
<!-- <replaceregex pattern="ooxml-lite" replace="ooxml-schemas" flags="g"/>-->
<replaceregex pattern="(.java|.src)$$" replace="-sources"/>
<replaceregex pattern=".*(?:build|src).?(.*)?" replace="\1"/>
<replaceregex pattern="(.*)(-classes|-sources)" replace="poi-\1/poi-\1-${version.id}\2"/>
@ -2299,10 +2299,9 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
<m2-install artifactId="poi-scratchpad"/>
<m2-install artifactId="poi-ooxml"/>
<m2-install artifactId="poi-examples"/>
<m2-install artifactId="poi-ooxml-schemas"/>
<m2-install artifactId="poi-ooxml-lite"/>
<m2-install artifactId="poi-ooxml-full"/>
<m2-install artifactId="poi-excelant"/>
<m2-install artifactId="poi-excelant"/>
<m2-install artifactId="ooxml-schemas" versionId="${maven.ooxml.xsds.version.id}"/>
</target>
<target name="rat-check" depends="init" description="Runs the Apache Creadur Rat check against the source code, to spot any files which are missing the correct license headers">
@ -2623,7 +2622,8 @@ org/apache/poi/schemas/ooxml/system/ooxml/rectaf36doctype.xsb
<nexus-upload artifactId="poi-examples"/>
<nexus-upload artifactId="poi-excelant"/>
<nexus-upload artifactId="poi-ooxml"/>
<nexus-upload artifactId="poi-ooxml-schemas"/>
<nexus-upload artifactId="poi-ooxml-lite"/>
<nexus-upload artifactId="poi-ooxml-full"/>
<nexus-upload artifactId="poi-scratchpad"/>
</target>

View File

@ -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')

View File

@ -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]).

View File

@ -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

View File

@ -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:
#
# <server>
# <id>apache-releases</id>
# <username>apacheId</username>
# <password>mySecurePassw0rd</password>
# </server>
#
# <profiles>
# <profile>
# <id>apache-releases</id>
# <properties>
# <gpg.passphrase><!-- Your GPG passphrase --></gpg.passphrase>
# </properties>
# </profile>
# </profiles>
#
# 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

View File

@ -24,12 +24,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<artifactId>poi-ooxml-full</artifactId>
<version>@VERSION@</version>
<packaging>jar</packaging>
<name>OOXML schemas</name>
<description>XmlBeans generated from the Ecma supplied xsds:
http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%20Part%204%20(DOCX).zip</description>
<name>Apache POI - OOXML schemas (full)</name>
<description>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</description>
<url>https://poi.apache.org/</url>
<mailingLists>

View File

@ -24,10 +24,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<artifactId>poi-ooxml-lite</artifactId>
<version>@VERSION@</version>
<packaging>jar</packaging>
<name>Apache POI</name>
<name>Apache POI - OOXML Schemas (lite)</name>
<url>https://poi.apache.org/</url>
<description>Apache POI - Java API To Access Microsoft Format Files</description>

View File

@ -24,7 +24,7 @@
<artifactId>poi-ooxml</artifactId>
<version>@VERSION@</version>
<packaging>jar</packaging>
<name>Apache POI</name>
<name>Apache POI - API based on OPC and OOXML schemas</name>
<url>https://poi.apache.org/</url>
<description>Apache POI - Java API To Access Microsoft Format Files</description>
@ -63,7 +63,7 @@
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<artifactId>poi-ooxml-lite</artifactId>
<version>@VERSION@</version>
</dependency>
<dependency>

View File

@ -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 @@
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<artifactId>poi-ooxml-lite</artifactId>
<version>${poi.version}</version>
</dependency>

View File

@ -9,7 +9,7 @@
<version>5.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>poi-ooxml-schema</artifactId>
<artifactId>poi-ooxml-lite</artifactId>
<packaging>jar</packaging>
<name>Apache POI - Openxmlformats Schema package</name>
@ -36,7 +36,7 @@
<target>
<property name="xsdir" value="${basedir}/../../src/ooxml/resources/org/apache/poi"/>
<copy todir="${basedir}/target/schemas">
<zipfileset src="${xsdir}/schemas/OfficeOpenXML-XMLSchema.zip"/>
<zipfileset src="${xsdir}/schemas/OfficeOpenXML-XMLSchema-Transitional.zip"/>
<zipfileset src="${xsdir}/schemas/OpenPackagingConventions-XMLSchema.zip" includes="opc-digSig.xsd,opc-relationships.xsd"/>
<fileset dir="${xsdir}/xdgf" includes="*.xsd,*.xsdconfig"/>
<fileset dir="${xsdir}/schemas" includes="*.xsd,*.xsdconfig"/>
@ -105,7 +105,7 @@
<directory>${basedir}/target/generated-resources</directory>
</resource>
<resource>
<directory>${basedir}/../../src/multimodule/ooxml-schemas/java9</directory>
<directory>${basedir}/../../src/multimodule/ooxml-full/java9</directory>
<targetPath>META-INF/versions/9</targetPath>
<includes>
<include>*.class</include>

View File

@ -102,7 +102,7 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>poi-ooxml-schema</artifactId>
<artifactId>poi-ooxml-lite</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>

View File

@ -57,7 +57,7 @@
<modules>
<module>main</module>
<module>ooxml-schema</module>
<module>ooxml-full</module>
<module>ooxml</module>
<module>scratchpad</module>
<module>excelant</module>
@ -118,6 +118,7 @@
</dependency>
</dependencies>
<configuration>
<printSummary>false</printSummary>
<systemPropertyVariables>
<POI.testdata.path>../../test-data</POI.testdata.path>
<java.awt.headless>true</java.awt.headless>

View File

@ -17,7 +17,7 @@
// 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",
)

View File

@ -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)

View File

@ -147,7 +147,7 @@ public class ExcelAntTask extends Task {
throw new BuildException(
"The <classpath> for <excelant> 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());
}

View File

@ -86,7 +86,7 @@ Before running this, you should execute the "assemble" target in the main build.
<fileset dir="${dist}">
<include name="**/poi-5.*.jar"/>
<include name="**/poi-ooxml-5.*.jar"/>
<include name="**/poi-ooxml-schemas-5.*.jar"/>
<include name="**/poi-ooxml-lite-5.*.jar"/>
<exclude name="**/*-javadoc*"/>
<exclude name="**/*-sources*"/>
</fileset>
@ -129,7 +129,7 @@ Before running this, you should execute the "assemble" target in the main build.
<fileset dir="${dist}">
<include name="**/poi-5.*.jar"/>
<include name="**/poi-ooxml-5.*.jar"/>
<include name="**/poi-ooxml-schemas-5.*.jar"/>
<include name="**/poi-ooxml-lite-5.*.jar"/>
<include name="**/poi-scratchpad-5.*.jar"/>
<exclude name="**/*-javadoc*"/>
<exclude name="**/*-sources*"/>

View File

@ -40,7 +40,7 @@ public final class XPathHelper {
"Schemas (*.xsb) for <CLASS> 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>.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("<CLASS>", "AlternateContent")

View File

@ -68,7 +68,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
XmlObject xo = xc.getObject();
// 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 (xo instanceof XmlAnyTypeImpl){
String errStr =
"Schemas (*.xsb) for CTTable can't be loaded - usually this happens when OSGI " +

View File

@ -26,7 +26,7 @@ import org.junit.Test;
import org.openxmlformats.schemas.drawingml.x2006.chart.*;
import org.openxmlformats.schemas.drawingml.x2006.main.*;
// aim is to get these classes loaded and included in poi-ooxml-schemas.jar
// aim is to get these classes loaded and included in poi-ooxml-lite.jar
public class TestNecessaryOOXMLClasses {
@Test

View File

@ -18,18 +18,18 @@
*/
package org.apache.poi.xddf.usermodel.chart;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.apache.poi.ooxml.POIXMLFactory;
import org.apache.poi.ooxml.POIXMLRelation;
import org.junit.Test;
import org.openxmlformats.schemas.drawingml.x2006.chart.CTChartSpace;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
public class TestXDDFChart {
@Test
public void testConstruct() {
// minimal test to cause ooxml-lite to include all the classes in poi-ooxml-schemas
// minimal test to cause ooxml-lite to include all the classes in poi-ooxml-lite
XDDFChart xddfChart = newXDDFChart();
assertNotNull(xddfChart.getCTChartSpace());

View File

@ -16,15 +16,16 @@
==================================================================== */
package org.apache.poi.xddf.usermodel.chart;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.*;
import org.junit.Test;
public class TestXDDFChartExtensionList {
@Test
public void getXmlObject() {
// minimal test to include generated classes in poi-ooxml-schemas
// minimal test to include generated classes in poi-ooxml-lite
XDDFChartExtensionList list = new XDDFChartExtensionList();
assertNotNull(list.getXmlObject());

View File

@ -26,7 +26,7 @@ import java.util.function.Supplier;
import org.apache.xmlbeans.XmlObject;
import org.junit.Test;
// aim is to get these classes loaded and included in poi-ooxml-schemas.jar
// aim is to get these classes loaded and included in poi-ooxml-lite.jar
public class TestNecessaryOOXMLClasses {
@Test

View File

@ -22,7 +22,7 @@ import org.junit.Test;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRow;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTSheetData;
// aim is to get these classes loaded and included in poi-ooxml-schemas.jar
// aim is to get these classes loaded and included in poi-ooxml-lite.jar
public class TestNecessaryOOXMLClasses {
@Test

View File

@ -272,7 +272,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
}
/**
* ensure that CTPhoneticPr is loaded by the ooxml test suite so that it is included in poi-ooxml-schemas
* ensure that CTPhoneticPr is loaded by the ooxml test suite so that it is included in poi-ooxml-lite
*/
@Test
public void bug49325() throws IOException {
@ -1969,7 +1969,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
/**
* CTDefinedNamesImpl should be included in the smaller
* poi-ooxml-schemas jar
* poi-ooxml-lite jar
*/
@Test
public void bug57176() throws IOException {

View File

@ -24,7 +24,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblLayoutType;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STEm;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblLayoutType;
// aim is to get these classes loaded and included in poi-ooxml-schemas.jar
// aim is to get these classes loaded and included in poi-ooxml-lite.jar
public class TestNecessaryOOXMLClasses {
@Test

View File

@ -17,16 +17,6 @@
package org.apache.poi.xwpf.extractor;
import org.apache.poi.util.StringUtil;
import org.apache.poi.xwpf.XWPFTestDataSamples;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.junit.Test;
import java.io.IOException;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.apache.poi.POITestCase.assertContains;
import static org.apache.poi.POITestCase.assertEndsWith;
import static org.apache.poi.POITestCase.assertNotContained;
@ -35,6 +25,16 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.poi.util.StringUtil;
import org.apache.poi.xwpf.XWPFTestDataSamples;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.junit.Test;
/**
* Tests for HXFWordExtractor
*/
@ -431,7 +431,7 @@ public class TestXWPFWordExtractor {
@Test
public void testCTPictureBase() throws IOException {
//This forces ctpicturebase to be included in the poi-ooxml-schemas jar
//This forces ctpicturebase to be included in the poi-ooxml-lite jar
try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("61991.docx");
XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) {
String txt = extractor.getText();

View File

@ -659,7 +659,7 @@ public class TestXWPFRun {
final XWPFRun run = document.createParagraph().createRun();
// at least trigger some of the setters to ensure classes are included in
// the poi-ooxml-schemas
// the poi-ooxml-lite
run.setBold(true);
run.setCapitalized(true);
run.setCharacterSpacing(2);

View File

@ -94,7 +94,7 @@ public final class TestXWPFStyles {
/**
* YK: tests below don't make much sense,
* they exist only to copy xml beans to pi-ooxml-schemas.jar
* they exist only to copy xml beans to pi-ooxml-lite.jar
*/
@SuppressWarnings("resource")
@Test

View File

@ -16,15 +16,15 @@
==================================================================== */
package org.apache.poi.xwpf.usermodel;
import org.junit.Test;
import static org.junit.Assert.assertNull;
import org.junit.Test;
public class XWPFAbstractNumTest {
@Test
public void getXmlObject() {
// minimal test to include generated classes in poi-ooxml-schemas
// minimal test to include generated classes in poi-ooxml-lite
XWPFAbstractNum num = new XWPFAbstractNum();
assertNull(num.getCTAbstractNum());
}