Skip to content

Commit

Permalink
TEIID-5225 (#1056)
Browse files Browse the repository at this point in the history
* TEIID-5225: removing the external dependecy to nux library and pulling in needed classes inline. Also updating xercesImpl version to match the one in maven central

* TEIID-5225 removing unnecessary nux classes

* TEIID-5225 explicitly adding xml-apis
  • Loading branch information
shawkins authored and rareddy committed Jan 24, 2018
1 parent c9795f9 commit b4f2f66
Show file tree
Hide file tree
Showing 26 changed files with 6,798 additions and 48 deletions.
1 change: 0 additions & 1 deletion build/kits/karaf/teiid-karaf-features.xml
Expand Up @@ -16,7 +16,6 @@
<bundle dependency="true">wrap:mvn:net.sourceforge.saxon/saxonhe/${version.net.sourceforge.saxon}</bundle>
<bundle dependency="true">wrap:mvn:org.jboss/staxmapper/${version.org.jboss.staxmapper}</bundle>
<bundle dependency="true">mvn:xom/xom/${version.xom}</bundle>
<bundle dependency="true">wrap:mvn:nux/nux/${version.nux}</bundle>
<bundle dependency="true">wrap:mvn:com.vividsolutions/jts/${version.jts}</bundle>
<bundle dependency="true">wrap:mvn:org.hibernate/hibernate-core/${version.hibernate-core}</bundle>

Expand Down
5 changes: 0 additions & 5 deletions engine/pom.xml
Expand Up @@ -120,11 +120,6 @@
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
</dependency>

<dependency>
<groupId>nux</groupId>
<artifactId>nux</artifactId>
</dependency>

<dependency>
<groupId>org.teiid</groupId>
Expand Down
Expand Up @@ -55,20 +55,6 @@
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

import net.sf.saxon.expr.JPConverter;
import net.sf.saxon.om.Item;
import net.sf.saxon.om.Name11Checker;
import net.sf.saxon.om.NodeInfo;
import net.sf.saxon.om.QNameException;
import net.sf.saxon.sxpath.XPathEvaluator;
import net.sf.saxon.sxpath.XPathExpression;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.value.AtomicValue;
import net.sf.saxon.value.DateTimeValue;
import net.sf.saxon.value.DateValue;
import net.sf.saxon.value.DayTimeDurationValue;
import net.sf.saxon.value.TimeValue;

import org.teiid.api.exception.query.FunctionExecutionException;
import org.teiid.common.buffer.BufferManager;
import org.teiid.common.buffer.FileStore;
Expand Down Expand Up @@ -97,6 +83,20 @@
import org.teiid.util.StAXSQLXML;
import org.teiid.util.StAXSQLXML.StAXSourceProvider;

import net.sf.saxon.expr.JPConverter;
import net.sf.saxon.om.Item;
import net.sf.saxon.om.Name11Checker;
import net.sf.saxon.om.NodeInfo;
import net.sf.saxon.om.QNameException;
import net.sf.saxon.sxpath.XPathEvaluator;
import net.sf.saxon.sxpath.XPathExpression;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.value.AtomicValue;
import net.sf.saxon.value.DateTimeValue;
import net.sf.saxon.value.DateValue;
import net.sf.saxon.value.DayTimeDurationValue;
import net.sf.saxon.value.TimeValue;


/**
* This class contains scalar system functions supporting for XML manipulation.
Expand Down Expand Up @@ -1173,10 +1173,10 @@ public static Object serialize(XMLSerialize xs, XMLType value) throws Transforma
XMLEvent start = null;
if (xs.getVersion() != null) {
start = xmlEventFactory.createStartDocument(encoding.name(), xs.getVersion());
} else if (xs.getEncoding() != null) {
start = xmlEventFactory.createStartDocument(encoding.name());
} else {
start = xmlEventFactory.createStartDocument();
//use the encoding regardless as different stax impls have different default
//behavior
start = xmlEventFactory.createStartDocument(encoding.name());
}
StAXSourceProvider sourceProvider = new DeclarationStaxSourceProvider(start, value);
value = new XMLType(new StAXSQLXML(sourceProvider, encoding));
Expand Down
21 changes: 13 additions & 8 deletions pom.xml
Expand Up @@ -14,7 +14,7 @@

<version>10.1.0.Alpha1-SNAPSHOT</version>
<description>Federated SQL and XML query engine.</description>
<properties>
<properties>
<site.url>http://www.jboss.org/teiid</site.url>
<jdk.min.version>1.8</jdk.min.version>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down Expand Up @@ -55,7 +55,6 @@
<version.com.force.api>22.0.0</version.com.force.api>
<version.com.force.api.34>34.0.0</version.com.force.api.34>
<version.com.force.api.41>41.0.0</version.com.force.api.41>
<version.nux>1.6</version.nux>
<version.gdata-core>1.47.1</version.gdata-core>
<version.olap4j>1.1.0</version.olap4j>
<version.hadoop-common>2.2.0</version.hadoop-common>
Expand Down Expand Up @@ -104,6 +103,8 @@
<version.javax.validation>1.1.0.Final</version.javax.validation>
<version.org.wildfly.build-tools>1.1.6.Final</version.org.wildfly.build-tools>
<version.com.googlecode.json-simple>1.1.1</version.com.googlecode.json-simple>
<version.xerces>2.11.0</version.xerces>
<version.xml-apis>1.4.01</version.xml-apis>

<!-- Infinispan Translator -->
<version.org.infinispan>9.1.2.Final</version.org.infinispan>
Expand Down Expand Up @@ -797,12 +798,6 @@
<artifactId>hibernate-core</artifactId>
<version>${version.org.hibernate}</version>
</dependency>

<dependency>
<groupId>nux</groupId>
<artifactId>nux</artifactId>
<version>${version.nux}</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -1293,6 +1288,16 @@
<artifactId>commons-net</artifactId>
<version>${version.commons-net}</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${version.xerces}</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>${version.xml-apis}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
Expand Down
24 changes: 24 additions & 0 deletions saxon-xom/LEGAL.txt
@@ -0,0 +1,24 @@
Nux Copyright (c) 2005, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this
software, please contact Berkeley Lab's Technology Transfer Department
at TTD@lbl.gov referring to "Nux (LBNL Ref CR-2179)"

This software package includes code written by others which may be
governed by separate license agreements. Please refer to the list of
dependencies and the associated licenses for further details.

NOTICE. This software was developed under funding from the U.S.
Department of Energy. As such, the U.S. Government has been granted for
itself and others acting on its behalf a paid-up, nonexclusive,
irrevocable, worldwide license in the Software to reproduce, prepare
derivative works, and perform publicly and display publicly. Beginning
five (5) years after the date permission to assert copyright is obtained
from the U.S. Department of Energy, and subject to any subsequent five
(5) year renewals, the U.S. Government is granted for itself and others
acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide
license in the Software to reproduce, prepare derivative works,
distribute copies to the public, perform publicly and display publicly,
and to permit others to do so.
10 changes: 10 additions & 0 deletions saxon-xom/pom.xml
Expand Up @@ -28,6 +28,16 @@
<groupId>com.io7m.xom</groupId>
<artifactId>xom</artifactId>
</dependency>

<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>

<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</dependency>

</dependencies>

Expand Down

0 comments on commit b4f2f66

Please sign in to comment.