Skip to content

Commit

Permalink
[CQ-2136] using org.apache.xml.resolver from Orbit (#574)
Browse files Browse the repository at this point in the history
* [CQ-18796] using Orbit org.apache.commons.io

and exclude unused commons-math from libs-bundle

Change-Id: Ic39792cd55b6e1cd734a4efba21fa579df4a3e12
Signed-off-by: Frank Gasdorf <[email protected]>

* [CQ-2136] using org.apache.xml.resolver from Orbit

Change-Id: Ia8b98b4ee6ee5ca5c48bd72a31bccd1a2e827bee
Signed-off-by: Frank Gasdorf <[email protected]>
  • Loading branch information
fgdrf authored Nov 5, 2021
1 parent cbcaf7b commit e0533da
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
<unit id="org.apache.commons.httpclient" version="3.1.0.v201012070820"/>
<unit id="org.apache.ws.commons.util" version="1.0.2.v20160817-1930"/>
<unit id="org.apache.commons.io" version="2.6.0.v20190123-2029"/>
<unit id="org.apache.xml.resolver" version="1.2.0.v201005080400"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository/"/>
</location>
</locations>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.geotools.renderer.style.svg.SVGGraphicFactory;
import org.geotools.util.Version;
import org.geotools.util.factory.GeoTools;
import org.geotools.xml.resolver.SchemaCatalog;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
Expand All @@ -39,7 +40,7 @@
* @since 1.2.0
*/
public class GeoToolsTest {

/**
* @throws java.lang.Exception
*/
Expand All @@ -62,14 +63,14 @@ public void testGeoTools(){
@Test
public void testSVGGraphicsFactory() throws Exception {
URL url = GeoToolsTest.class.getResource("example.svg");

SVGGraphicFactory svgFactory = new SVGGraphicFactory();
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
Literal expr = ff.literal( url.toExternalForm() );

Icon icon = svgFactory.getIcon(null, expr, "image/svg",16 );
assertNotNull( icon );

}

// @Ignore("FIXME: due to migration to batik bundle from Orbit")
Expand All @@ -81,4 +82,9 @@ public void testSVGGraphicsFactory() throws Exception {
// SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
// f.createDocument(url.toString());
// }

@Test
public void testLoadClassSchemaCatalogWithResolverDependencies() throws Exception {
assertNotNull("class need org.apache.xml.resolver dependency to load", SchemaCatalog.build(new URL("http://maven.apache.org/xsd/maven-4.0.0.xsd")));
}
}
1 change: 0 additions & 1 deletion plugins/org.locationtech.udig.libs/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@
<classpathentry exported="true" kind="lib" path="lib/uom-lib-common-1.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/uom-se-1.0.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/wkb4j-1.0-RC1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xml-commons-resolver-1.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-compiler-3.0.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/gdal-2.2.0.jar"/>
Expand Down
11 changes: 5 additions & 6 deletions plugins/org.locationtech.udig.libs/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ Import-Package: com.google.common.annotations;version="27.0.0",
org.apache.commons.io.output;version="2.4.0",
org.apache.ws.commons.serialize;version="1.0.2",
org.apache.ws.commons.util;version="1.0.2",
org.apache.xml.resolver;version="1.2.0",
org.apache.xml.resolver.apps;version="1.2.0",
org.apache.xml.resolver.helpers;version="1.2.0",
org.apache.xml.resolver.readers;version="1.2.0",
org.apache.xml.resolver.tools;version="1.2.0",
org.jfree;version="1.0.13",
org.jfree.base;version="1.0.13",
org.jfree.base.config;version="1.0.13",
Expand Down Expand Up @@ -433,7 +438,6 @@ Bundle-ClassPath: .,
lib/uom-lib-common-1.0.2.jar,
lib/uom-se-1.0.8.jar,
lib/wkb4j-1.0-RC1.jar,
lib/xml-commons-resolver-1.2.jar,
lib/xpp3_min-1.1.4c.jar
Export-Package: .,
au.com.objectix.jgridshift,
Expand Down Expand Up @@ -651,11 +655,6 @@ Export-Package: .,
org.apache.commons.lang3.math;version="3.8.1",
org.apache.commons.pool;version="1.5.4",
org.apache.commons.pool.impl;version="1.5.4",
org.apache.xml.resolver;version="1.2.0",
org.apache.xml.resolver.apps;version="1.2.0",
org.apache.xml.resolver.helpers;version="1.2.0",
org.apache.xml.resolver.readers;version="1.2.0",
org.apache.xml.resolver.tools;version="1.2.0",
org.codehaus.janino,
org.codehaus.janino.samples,
org.codehaus.janino.tools,
Expand Down
1 change: 0 additions & 1 deletion plugins/org.locationtech.udig.libs/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ bin.includes = .,\
lib/uom-lib-common-1.0.2.jar,\
lib/uom-se-1.0.8.jar,\
lib/wkb4j-1.0-RC1.jar,\
lib/xml-commons-resolver-1.2.jar,\
log4j.xml,\
lib/xpp3_min-1.1.4c.jar
src.includes = pom-libs.xml,\
Expand Down
7 changes: 7 additions & 0 deletions plugins/org.locationtech.udig.libs/pom-libs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,13 @@
<version>3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.xml</groupId>
<artifactId>xml-commons-resolver</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>

<!-- add jdbc drivers dependencies -->
<!-- normally drivers will be retrieved from the dependencies of the
corresponding gt-jdbc-xxx geotools packages. Usually the latest
Expand Down

0 comments on commit e0533da

Please sign in to comment.