#59268 - adapt xml schema changes to maven build and add apache staging repository temporarily

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1834257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2018-06-24 18:53:14 +00:00
parent 2d046ec2ae
commit f509d1deae

View File

@ -1,4 +1,5 @@
<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">
<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>poi-parent</artifactId>
@ -116,7 +117,8 @@
<org.apache.poi.util.POILogger>org.apache.poi.util.NullLogger</org.apache.poi.util.POILogger>
</systemPropertyVariables>
<!-- use to following to analyze OOM issues: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -->
<argLine>@{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=target/tmp</argLine>
<argLine>@{argLine} -Duser.language=en -Duser.country=US -Xmx1024m -Djava.io.tmpdir=target/tmp
</argLine>
<excludes>
<exclude>**/All*Tests.java</exclude>
<exclude>**/TestUnfixedBugs.java</exclude>
@ -199,7 +201,9 @@
<profile>
<id>xmlbean</id>
<activation>
<file><exists>xmlbeans.marker</exists></file>
<file>
<exists>xmlbeans.marker</exists>
</file>
</activation>
<build>
<plugins>
@ -220,10 +224,18 @@
<noUpa>${xmlbeans.noUpa}</noUpa>
<noPvr>${xmlbeans.noPvr}</noPvr>
<xmlConfigs>
<xmlConfig implementation="java.io.File">${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionCertificate.xsdconfig</xmlConfig>
<xmlConfig implementation="java.io.File">${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionInfo.xsdconfig</xmlConfig>
<xmlConfig implementation="java.io.File">${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionPassword.xsdconfig</xmlConfig>
<xmlConfig implementation="java.io.File">${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig</xmlConfig>
<xmlConfig implementation="java.io.File">
${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionCertificate.xsdconfig
</xmlConfig>
<xmlConfig implementation="java.io.File">
${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionInfo.xsdconfig
</xmlConfig>
<xmlConfig implementation="java.io.File">
${basedir}/../../src/ooxml/resources/org/apache/poi/poifs/crypt/encryptionPassword.xsdconfig
</xmlConfig>
<xmlConfig implementation="java.io.File">
${basedir}/../../src/ooxml/resources/org/apache/poi/schemas/ooxmlSchemas.xsdconfig
</xmlConfig>
</xmlConfigs>
</configuration>
</execution>
@ -237,24 +249,11 @@
<execution>
<id>copy-xmltype-and-xsdconfig</id>
<phase>generate-sources</phase>
<goals><goal>run</goal></goals>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy todir="${basedir}/target/generated-sources/xmlbeans">
<fileset dir="${basedir}/../../src/ooxml/java">
<include name="org/apache/poi/ooxml/POIXMLTypeLoader.java"/>
<include name="org/apache/poi/ooxml/util/DocumentHelper.java"/>
<include name="org/apache/poi/ooxml/util/SAXHelper.java"/>
<include name="org/apache/poi/openxml4j/opc/PackageNamespaces.java"/>
</fileset>
<fileset dir="${basedir}/../../src/java">
<include name="org/apache/poi/util/POILogFactory.java"/>
<include name="org/apache/poi/util/POILogger.java"/>
<include name="org/apache/poi/util/NullLogger.java"/>
<include name="org/apache/poi/util/Internal.java"/>
<include name="org/apache/poi/util/Removal.java"/>
</fileset>
</copy>
<copy todir="${basedir}/target/schemas">
<fileset dir="${basedir}/../../src/ooxml/resources/org/apache/poi/schemas"/>
</copy>
@ -264,12 +263,47 @@
<execution>
<id>replace-xmltypeloader</id>
<phase>process-sources</phase>
<goals><goal>run</goal></goals>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<replace dir="${basedir}/target/generated-sources/xmlbeans" includes="**/*.java" excludes="**/impl/**">
<replacetoken>org.apache.xmlbeans.XmlBeans.getContextTypeLoader()</replacetoken>
<replacevalue>org.apache.poi.ooxml.POIXMLTypeLoader</replacevalue>
<property name="xmlbean.sources.dir"
location="${basedir}/target/generated-sources/xmlbeans"/>
<property name="loaderMethod"><![CDATA[
private static java.lang.ref.SoftReference<org.apache.xmlbeans.SchemaTypeLoader> typeLoader;
private static synchronized org.apache.xmlbeans.SchemaTypeLoader getTypeLoader() {
org.apache.xmlbeans.SchemaTypeLoader stl = (typeLoader == null) ? null : typeLoader.get();
if (stl == null) {
stl = org.apache.xmlbeans.XmlBeans.typeLoaderForClassLoader(\2.class.getClassLoader());
typeLoader = new java.lang.ref.SoftReference(stl);
}
return stl;
}
public static \2 newInstance\(\) \{]]></property>
<replaceregexp byline="true"
match="(\s*)public static ([^ ]+) newInstance\(\) \{"
replace="${loaderMethod}">
<fileset dir="${xmlbean.sources.dir}" includes="**/*.java"
excludes="**/impl/**"/>
</replaceregexp>
<replace dir="${xmlbean.sources.dir}" includes="**/*.java"
excludes="**/impl/**">
<replacetoken>org.apache.xmlbeans.XmlBeans.getContextTypeLoader
</replacetoken>
<replacevalue>getTypeLoader</replacevalue>
</replace>
<!-- remove deprecated warnings, as we prefer the array methods - see #56854 -->
<replace dir="${xmlbean.sources.dir}" includes="**/*.java"
excludes="**/impl/**">
<replacetoken><![CDATA[ * @deprecated
]]></replacetoken>
</replace>
</target>
</configuration>
@ -277,7 +311,9 @@
<execution>
<id>remove-xmltypeloader-from-schema-jar</id>
<phase>prepare-package</phase>
<goals><goal>run</goal></goals>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<touch file="${basedir}/target/generated-sources/xmlbeans/.staleFlag"/>
@ -289,6 +325,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.xmlbeans</groupId>