Skip to content

Commit

Permalink
Update to xerces-2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Diesler committed Jan 30, 2012
1 parent 593a9c8 commit d544663
Show file tree
Hide file tree
Showing 28 changed files with 684 additions and 1,656 deletions.
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,2 +1,2 @@
/target
/target
*.iml
target
17 changes: 0 additions & 17 deletions .project

This file was deleted.

6 changes: 0 additions & 6 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

9 changes: 0 additions & 9 deletions .settings/org.maven.ide.eclipse.prefs

This file was deleted.

8 changes: 0 additions & 8 deletions bundle/.classpath

This file was deleted.

1 change: 0 additions & 1 deletion bundle/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions bundle/.project

This file was deleted.

6 changes: 0 additions & 6 deletions bundle/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

9 changes: 0 additions & 9 deletions bundle/.settings/org.maven.ide.eclipse.prefs

This file was deleted.

209 changes: 111 additions & 98 deletions bundle/pom.xml
@@ -1,109 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- ====================================================================== -->
<!-- -->
<!-- JBoss, the OpenSource J2EE webOS -->
<!-- -->
<!-- Distributable under LGPL license. -->
<!-- See terms of license at http://www.gnu.org. -->
<!-- -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- JBoss, the OpenSource J2EE webOS -->
<!-- -->
<!-- Distributable under LGPL license. -->
<!-- See terms of license at http://www.gnu.org. -->
<!-- -->
<!-- ====================================================================== -->

<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>
<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>

<name>JBossOSGi Xerces Bundle</name>

<groupId>org.jboss.osgi.xerces</groupId>
<artifactId>jboss-osgi-xerces</artifactId>
<packaging>bundle</packaging>
<parent>
<groupId>org.jboss.osgi.xerces</groupId>
<artifactId>jbosgi-xerces-parent</artifactId>
<version>2.10.0-SNAPSHOT</version>
</parent>

<name>JBossOSGi Xerces Bundle</name>

<!-- Parent -->
<parent>
<groupId>org.jboss.osgi.xerces</groupId>
<artifactId>jboss-osgi-xerces-parent</artifactId>
<version>2.9.1.SP8-SNAPSHOT</version>
</parent>
<artifactId>jbosgi-xerces</artifactId>
<packaging>bundle</packaging>

<!-- Dependencies -->
<dependencies>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</dependency>
<dependency>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<scope>provided</scope>
</dependency>

<!-- OSGi Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Dependencies -->
<dependencies>
<dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
<!--
<dependency>
<groupId>wutka-dtdparser</groupId>
<artifactId>dtdparser121</artifactId>
</dependency>
-->
<dependency>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.xml.internal.XMLParserActivatorExt</Bundle-Activator>
<Privat-Package>
org.jboss.osgi.xml.internal
</Privat-Package>
<Export-Package>
org.jboss.osgi.xml;version=${project.version}
</Export-Package>
<Import-Package>
javax.xml.datatype,
javax.xml.namespace,
javax.xml.parsers,
javax.xml.stream;resolution:=optional,
javax.xml.stream.events;resolution:=optional,
javax.xml.transform;resolution:=optional,
javax.xml.transform.dom;resolution:=optional,
javax.xml.transform.sax;resolution:=optional,
javax.xml.transform.stax;resolution:=optional,
javax.xml.transform.stream;resolution:=optional,
javax.xml.validation;resolution:=optional,
org.apache.xml.resolver*;version="[1.2,2.0)",
org.w3c.dom,
org.w3c.dom.events,
org.w3c.dom.ls,
org.w3c.dom.ranges;resolution:=optional,
org.w3c.dom.traversal;resolution:=optional,
org.w3c.dom.views;resolution:=optional,
org.xml.sax,
org.xml.sax.ext,
org.xml.sax.helpers,

<!-- OSGi Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- import -->
org.jboss.logging;version="[3.0,4.0)",
org.osgi.framework;version="[1.5,2.0)",
org.osgi.util.xml;version="[1.0,2.0)",

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.xml.internal.XMLParserActivatorExt</Bundle-Activator>
<Privat-Package>
org.jboss.osgi.xml.internal
</Privat-Package>
<Export-Package>
org.jboss.osgi.xml;version=${project.version}
</Export-Package>
<Import-Package>
javax.xml.datatype,
javax.xml.namespace,
javax.xml.parsers,
javax.xml.transform*,
javax.xml.validation,
org.w3c.dom*,
org.xml.sax*,
<!-- ignore -->
!sun.io
</Import-Package>
<Embed-Dependency>
xercesImpl;inline=false,
xml-apis;inline=false,
xml-resolver;inline=false,
</Embed-Dependency>
<_exportcontents>
org.apache.xml.resolver*;version=1.2,
</_exportcontents>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

<!-- import -->
org.jboss.logging;version="[3.0,4.0)",
org.jboss.osgi.spi.*;version="[1.0,2.0)",
org.osgi.framework;version="[1.5,2.0)",
org.osgi.util.xml;version="[1.0,2.0)",

<!-- ignore -->
!sun.io,
</Import-Package>
<Embed-Dependency>
<!-- dtdparser121;inline=false, -->
xercesImpl;inline=false,
xml-resolver;inline=false,
</Embed-Dependency>
<_exportcontents>
<!-- com.wutka.dtd;version=${version.wutka.dtdparser}, -->
org.apache.xerces.*;version=${version.apache.xerces},
</_exportcontents>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

</project>
Expand Up @@ -26,24 +26,20 @@

/**
* A DocumentBuilderFactory that gets loaded from this bundle.
*
*
* @author thomas.diesler@jboss.com
* @since 21-Jul-2009
*/
public class DocumentBuilderFactoryImpl extends org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
{
@Override
public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException
{
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
return super.newDocumentBuilder();
}
finally
{
Thread.currentThread().setContextClassLoader(ctxLoader);
}
}
public class DocumentBuilderFactoryImpl extends org.apache.xerces.jaxp.DocumentBuilderFactoryImpl {
@Override
public DocumentBuilder newDocumentBuilder() throws ParserConfigurationException {
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
DocumentBuilder domBuilder = super.newDocumentBuilder();
return domBuilder;
} finally {
Thread.currentThread().setContextClassLoader(ctxLoader);
}
}
}
27 changes: 11 additions & 16 deletions bundle/src/main/java/org/jboss/osgi/xml/SAXParserFactoryImpl.java
Expand Up @@ -30,20 +30,15 @@
* @author thomas.diesler@jboss.com
* @since 21-Jul-2009
*/
public class SAXParserFactoryImpl extends org.apache.xerces.jaxp.SAXParserFactoryImpl
{
@Override
public SAXParser newSAXParser() throws ParserConfigurationException
{
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
return super.newSAXParser();
}
finally
{
Thread.currentThread().setContextClassLoader(ctxLoader);
}
}
public class SAXParserFactoryImpl extends org.apache.xerces.jaxp.SAXParserFactoryImpl {
@Override
public SAXParser newSAXParser() throws ParserConfigurationException {
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
return super.newSAXParser();
} finally {
Thread.currentThread().setContextClassLoader(ctxLoader);
}
}
}

0 comments on commit d544663

Please sign in to comment.