mirror of https://github.com/apache/poi.git
Handle errors from GraalVM native mode runs - UnsupportedFeature on setting Sax features together with missing ErrorMessages from the java.xml module
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1882714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
02da9fd353
commit
9c367c57c0
37
build.xml
37
build.xml
|
@ -1938,6 +1938,16 @@ under the License.
|
|||
</replacetokens>
|
||||
</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">
|
||||
<filterchain>
|
||||
<replacetokens>
|
||||
<token key="VERSION" value="${maven.ooxml.xsds.version.id}"/>
|
||||
</replacetokens>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
||||
<echo>Maven POMs are located in ${dist.dir}</echo>
|
||||
<echo>Use ant dist-nexus to deploy the artifacts in the remote repository</echo>
|
||||
</target>
|
||||
|
@ -2211,22 +2221,25 @@ under the License.
|
|||
</target>
|
||||
|
||||
<macrodef name="m2-install">
|
||||
<attribute name="artifactId"/>
|
||||
<attribute name="artifactId"/>
|
||||
<attribute name="versionId" default="${version.id}"/>
|
||||
|
||||
<sequential>
|
||||
<mvn:install file="${dist.dir}/maven/@{artifactId}/@{artifactId}-${version.id}.jar">
|
||||
<pom file="${dist.dir}/maven/@{artifactId}/@{artifactId}-${version.id}.pom"/>
|
||||
</mvn:install>
|
||||
</sequential>
|
||||
<sequential>
|
||||
<mvn:install file="${dist.dir}/maven/@{artifactId}/@{artifactId}-@{versionId}.jar">
|
||||
<pom file="${dist.dir}/maven/@{artifactId}/@{artifactId}-@{versionId}.pom"/>
|
||||
</mvn:install>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="mvn-install" depends="maventask,jar,maven-poms" description="Install POI artifacts into the local repository. Equivalent of 'mvn install'">
|
||||
<m2-install artifactId="poi"/>
|
||||
<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-excelant"/>
|
||||
<m2-install artifactId="poi"/>
|
||||
<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-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">
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.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.
|
||||
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-security</artifactId>
|
||||
<version>@VERSION@</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>OOXML security</name>
|
||||
<description>
|
||||
XmlBeans generated from various supplied xsds for encryption and signing:
|
||||
http://msdn.microsoft.com/en-us/library/dd925810(v=office.12).aspx
|
||||
http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip
|
||||
http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd
|
||||
http://uri.etsi.org/01903/v1.3.2/XAdES.xsd
|
||||
http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd
|
||||
http://dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd
|
||||
http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcterms.xsd
|
||||
http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcmitype.xsd
|
||||
</description>
|
||||
<url>https://poi.apache.org/</url>
|
||||
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>POI Users List</name>
|
||||
<subscribe>user-subscribe@poi.apache.org</subscribe>
|
||||
<unsubscribe>user-unsubscribe@poi.apache.org</unsubscribe>
|
||||
<archive>http://mail-archives.apache.org/mod_mbox/poi-user/</archive>
|
||||
</mailingList>
|
||||
<mailingList>
|
||||
<name>POI Developer List</name>
|
||||
<subscribe>dev-subscribe@poi.apache.org</subscribe>
|
||||
<unsubscribe>dev-unsubscribe@poi.apache.org</unsubscribe>
|
||||
<archive>http://mail-archives.apache.org/mod_mbox/poi-dev/</archive>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
</organization>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -269,7 +269,7 @@ public final class XMLHelper {
|
|||
return true;
|
||||
} catch (Exception e) {
|
||||
logThrowable(e, "SAX Feature unsupported", name);
|
||||
} catch (AbstractMethodError ame) {
|
||||
} catch (Error ame) {
|
||||
logThrowable(ame, "Cannot set SAX feature because outdated XML parser in classpath", name);
|
||||
}
|
||||
return false;
|
||||
|
@ -281,7 +281,8 @@ public final class XMLHelper {
|
|||
return true;
|
||||
} catch (Exception e) {
|
||||
logThrowable(e, "SAX Feature unsupported", name);
|
||||
} catch (AbstractMethodError ame) {
|
||||
} catch (Error ame) {
|
||||
// ignore all top error object - GraalVM in native mode is not coping with java.xml error message resources
|
||||
logThrowable(ame, "Cannot set SAX feature because outdated XML parser in classpath", name);
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue