You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2020/10/20 20:30:03 UTC
svn commit: r1882714 - in /poi/trunk: build.xml maven/ooxml-security.pom
src/java/org/apache/poi/util/XMLHelper.java
Author: kiwiwings
Date: Tue Oct 20 20:30:03 2020
New Revision: 1882714
URL: http://svn.apache.org/viewvc?rev=1882714&view=rev
Log:
Handle errors from GraalVM native mode runs - UnsupportedFeature on setting Sax features together with missing ErrorMessages from the java.xml module
Removed:
poi/trunk/maven/ooxml-security.pom
Modified:
poi/trunk/build.xml
poi/trunk/src/java/org/apache/poi/util/XMLHelper.java
Modified: poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1882714&r1=1882713&r2=1882714&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Tue Oct 20 20:30:03 2020
@@ -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">
Modified: poi/trunk/src/java/org/apache/poi/util/XMLHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/XMLHelper.java?rev=1882714&r1=1882713&r2=1882714&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/XMLHelper.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/XMLHelper.java Tue Oct 20 20:30:03 2020
@@ -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;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org