mirror of https://github.com/apache/poi.git
the subdir element needs to be included otherwise certain xmlbean operations (e.g. selectPath) can't find the corresponding xmlbeans classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1640846 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
284e328f11
commit
b5288cf29e
|
@ -32,6 +32,7 @@ import java.util.Map;
|
|||
import java.util.Vector;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
|
@ -133,10 +134,11 @@ public final class OOXMLLite {
|
|||
//finally copy the compiled .xsb files
|
||||
System.out.println("Copying .xsb resources");
|
||||
JarFile jar = new JarFile(_ooxmlJar);
|
||||
Pattern p = Pattern.compile("schemaorg_apache_xmlbeans/(system|element)/.*\\.xsb");
|
||||
try {
|
||||
for(Enumeration<JarEntry> e = jar.entries(); e.hasMoreElements(); ){
|
||||
JarEntry je = e.nextElement();
|
||||
if(je.getName().matches("schemaorg_apache_xmlbeans/system/\\w+/\\w+\\.xsb")) {
|
||||
if(p.matcher(je.getName()).matches()) {
|
||||
File destFile = new File(_destDest, je.getName());
|
||||
copyFile(jar.getInputStream(je), destFile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue