mirror of https://github.com/apache/poi.git
#64411 - Provide JigSaw modules - use XmlBeans 4.0.0 (preview)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9be2598119
commit
01717a3fd6
30
build.xml
30
build.xml
|
@ -184,6 +184,7 @@ under the License.
|
||||||
<attribute name="snapshot"/>
|
<attribute name="snapshot"/>
|
||||||
<attribute name="query"/>
|
<attribute name="query"/>
|
||||||
<attribute name="target"/>
|
<attribute name="target"/>
|
||||||
|
<attribute name="url"/>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var parts = attributes.get("artifact").split(/:/);
|
var parts = attributes.get("artifact").split(/:/);
|
||||||
var packaging = attributes.get("packaging") || "jar";
|
var packaging = attributes.get("packaging") || "jar";
|
||||||
|
@ -196,7 +197,8 @@ under the License.
|
||||||
var usageDir = attributes.get("usage");
|
var usageDir = attributes.get("usage");
|
||||||
usageDir = project.getProperty("basedir")+(usageDir.charAt(0) == '/' ? "" : "/lib/")+usageDir;
|
usageDir = project.getProperty("basedir")+(usageDir.charAt(0) == '/' ? "" : "/lib/")+usageDir;
|
||||||
var jarLoc = usageDir+"/"+(attributes.get("target")||(parts[1]+"-"+parts[2]+"."+packaging));
|
var jarLoc = usageDir+"/"+(attributes.get("target")||(parts[1]+"-"+parts[2]+"."+packaging));
|
||||||
var urlLoc = repo+"/"+parts[0].replace(/\./g,"/")+"/"+parts[1]+"/"+parts[2]+"/"+
|
var urlLoc = attributes.get("url") ||
|
||||||
|
repo+"/"+parts[0].replace(/\./g,"/")+"/"+parts[1]+"/"+parts[2]+"/"+
|
||||||
parts[1]+"-"+(attributes.get("snapshot") || parts[2])+"."+packaging+query;
|
parts[1]+"-"+(attributes.get("snapshot") || parts[2])+"."+packaging+query;
|
||||||
project.setProperty(attributes.get("prefix")+"."+packaging, jarLoc);
|
project.setProperty(attributes.get("prefix")+"."+packaging, jarLoc);
|
||||||
project.setProperty(attributes.get("prefix")+".url", urlLoc);
|
project.setProperty(attributes.get("prefix")+".url", urlLoc);
|
||||||
|
@ -239,8 +241,11 @@ under the License.
|
||||||
|
|
||||||
<!-- jars in the ooxml-lib directory, see the fetch-ooxml-jars target-->
|
<!-- jars in the ooxml-lib directory, see the fetch-ooxml-jars target-->
|
||||||
<dependency prefix="ooxml.curvesapi" artifact="com.github.virtuald:curvesapi:1.06" usage="ooxml"/>
|
<dependency prefix="ooxml.curvesapi" artifact="com.github.virtuald:curvesapi:1.06" usage="ooxml"/>
|
||||||
<dependency prefix="ooxml.xmlbeans" artifact="org.apache.xmlbeans:xmlbeans:3.1.0" usage="ooxml"/>
|
<dependency prefix="ooxml.xmlbeans" artifact="org.apache.xmlbeans:xmlbeans:4.0.0" usage="ooxml"
|
||||||
|
url="https://builds.apache.org/view/P/view/POI/job/POI-XMLBeans-DSL-1.8/lastSuccessfulBuild/artifact/build/xmlbeans-4.0.0.jar"/>
|
||||||
<dependency prefix="ooxml.commons-compress" artifact="org.apache.commons:commons-compress:1.20" usage="ooxml"/>
|
<dependency prefix="ooxml.commons-compress" artifact="org.apache.commons:commons-compress:1.20" usage="ooxml"/>
|
||||||
|
<!-- only used for compiling xmlbeans schemas -->
|
||||||
|
<!-- <dependency prefix="ooxml.commons-compress" artifact="com.github.javaparser:javaparser-core:3.16.1" usage="ooxml-provided"/>-->
|
||||||
|
|
||||||
<!-- jars in the ooxml-test-lib directory, see the fetch-ooxml-jars target-->
|
<!-- jars in the ooxml-test-lib directory, see the fetch-ooxml-jars target-->
|
||||||
<dependency prefix="ooxml.test.reflections" artifact="org.reflections:reflections:0.9.11" usage="ooxml-tests"/>
|
<dependency prefix="ooxml.test.reflections" artifact="org.reflections:reflections:0.9.11" usage="ooxml-tests"/>
|
||||||
|
@ -804,6 +809,7 @@ under the License.
|
||||||
noupa="@{noupa}"
|
noupa="@{noupa}"
|
||||||
nopvr="@{nopvr}"
|
nopvr="@{nopvr}"
|
||||||
typesystemname="@{typesystemname}"
|
typesystemname="@{typesystemname}"
|
||||||
|
repackage="org.apache.xmlbeans.metadata:org.apache.poi.schemas.@{typesystemname}"
|
||||||
>
|
>
|
||||||
<classpath>
|
<classpath>
|
||||||
<path location="${ooxml.xmlbeans.jar}"/>
|
<path location="${ooxml.xmlbeans.jar}"/>
|
||||||
|
@ -812,15 +818,8 @@ under the License.
|
||||||
<local name="loaderMethod"/>
|
<local name="loaderMethod"/>
|
||||||
<!-- the space between "public static" is on purpose to prevent double execution -->
|
<!-- the space between "public static" is on purpose to prevent double execution -->
|
||||||
<property name="loaderMethod"><![CDATA[
|
<property name="loaderMethod"><![CDATA[
|
||||||
private static java.lang.ref.SoftReference<org.apache.xmlbeans.SchemaTypeLoader> typeLoader;
|
private static synchronized org.apache.poi.schemas.@{typesystemname}.system.@{typesystemname}.TypeSystemHolder getTypeLoader() {
|
||||||
|
return org.apache.poi.schemas.@{typesystemname}.system.@{typesystemname}.TypeSystemHolder.typeSystem;
|
||||||
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>
|
public static \2 newInstance\(\) \{]]></property>
|
||||||
|
@ -877,7 +876,7 @@ under the License.
|
||||||
<delete file="@{sources-jar}"/>
|
<delete file="@{sources-jar}"/>
|
||||||
|
|
||||||
<jar destfile="@{classes-jar}" level="9">
|
<jar destfile="@{classes-jar}" level="9">
|
||||||
<fileset dir="${xmlbean.classes.dir}" excludes="org/apache/**"/>
|
<fileset dir="${xmlbean.classes.dir}"/>
|
||||||
<zipfileset prefix="META-INF/versions/9/" dir="@{multi-src}/java9" includes="**/*.class" if:true="${isJava8}"/>
|
<zipfileset prefix="META-INF/versions/9/" dir="@{multi-src}/java9" includes="**/*.class" if:true="${isJava8}"/>
|
||||||
<metainf dir="legal"/>
|
<metainf dir="legal"/>
|
||||||
<manifest>
|
<manifest>
|
||||||
|
@ -885,7 +884,7 @@ under the License.
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
<jar destfile="@{sources-jar}" level="9">
|
<jar destfile="@{sources-jar}" level="9">
|
||||||
<fileset dir="${xmlbean.sources.dir}" excludes="org/apache/**"/>
|
<fileset dir="${xmlbean.sources.dir}"/>
|
||||||
<zipfileset prefix="META-INF/versions/9/" dir="@{multi-src}/java9" excludes="**/*.class"/>
|
<zipfileset prefix="META-INF/versions/9/" dir="@{multi-src}/java9" excludes="**/*.class"/>
|
||||||
<metainf dir="legal"/>
|
<metainf dir="legal"/>
|
||||||
</jar>
|
</jar>
|
||||||
|
@ -905,7 +904,7 @@ under the License.
|
||||||
classes-jar="${ooxml.xsds.jar}"
|
classes-jar="${ooxml.xsds.jar}"
|
||||||
sources-jar="${ooxml.xsds.src.jar}"
|
sources-jar="${ooxml.xsds.src.jar}"
|
||||||
multi-src="${basedir}/src/multimodule/ooxml-schemas"
|
multi-src="${basedir}/src/multimodule/ooxml-schemas"
|
||||||
typesystemname="OoxmlSchemas"
|
typesystemname="ooxml"
|
||||||
>
|
>
|
||||||
<xsds>
|
<xsds>
|
||||||
<zipfileset src="${ooxml.xsds.izip.1}"/>
|
<zipfileset src="${ooxml.xsds.izip.1}"/>
|
||||||
|
@ -913,13 +912,12 @@ under the License.
|
||||||
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="ooxmlSchemas.xsdconfig,markup-compatibility.xsd"/>
|
<fileset dir="${ooxml.schema.xsdconfig.dir}" includes="ooxmlSchemas.xsdconfig,markup-compatibility.xsd"/>
|
||||||
</xsds>
|
</xsds>
|
||||||
</compile-ooxml-xmlbean>
|
</compile-ooxml-xmlbean>
|
||||||
|
|
||||||
<!-- Now do the same for the security schemas -->
|
<!-- Now do the same for the security schemas -->
|
||||||
<compile-ooxml-xmlbean
|
<compile-ooxml-xmlbean
|
||||||
classes-jar="${ooxml.security.jar}"
|
classes-jar="${ooxml.security.jar}"
|
||||||
sources-jar="${ooxml.security.src.jar}"
|
sources-jar="${ooxml.security.src.jar}"
|
||||||
multi-src="${basedir}/src/multimodule/ooxml-security"
|
multi-src="${basedir}/src/multimodule/ooxml-security"
|
||||||
typesystemname="OoxmlSecurity"
|
typesystemname="security"
|
||||||
>
|
>
|
||||||
<xsds>
|
<xsds>
|
||||||
<zipfileset src="${ooxml.xsds.izip.2}" includes="opc-digSig.xsd,opc-relationships.xsd"/>
|
<zipfileset src="${ooxml.xsds.izip.2}" includes="opc-digSig.xsd,opc-relationships.xsd"/>
|
||||||
|
|
Loading…
Reference in New Issue