Justin Deoliveira ha scritto:
At first glance Gabriel is correct, there is a direct dependency on xerces. And indeed the encoder uses the XMLSerializer class quite extensively so getting rid of it might not be all that easy. I don't see an alternative to XMLSerializer in java 1.5, but I do in java 1.6, XMLStreamWriter.
Pity.
Another alternative would be to create a stripped down version of xerces since we are only using a small part of the library. I think Andrea may have brought this up before.
Actually that was for an older jaxb dependency, for which we already
acted afaik. (by taking some code from the open source alternative
jaxme?).
Furthermore, at first glance it looks like we might be able to kill the following dependencies from the xml-xsd stuff:
* xml-apis
* xml-apis-xerces
* jdom
However removing those is negligible... less than 0.5M.
Well, that might well allow us to add 2 more megabytes of uncompressed
sample data, so not that bad?
The real hog is xalan which is 2.7M, which is dragged in via main and ows. Taking it off the build path reveals a single compile error in ows which is easily fixable (actually it's just in the test scope). Fixing that and starting geoserver it appears things run fine. I tried a variety of XML requests with no issues.
However the issue with XML libs always comes up in other deployments, various servlet containers and the like. So while it looks like we can kill the xalan dependency i would want to do some extensive testing in other environments.
I guess we test in Tomcat and JBoss, if somebody needs to add the
lib for other containers, they are still free to do so?
2.7MB is the size of the release directory zipped 
The xpp dependency comes in from the ows dispatcher. We could try and kill it as it is only used to read the root element of a request. Also an alternative (XMLStreamReader) seems to be available in java 1.6 as well. However the dependency on xpp is pretty minimal at < 0.2M.
Sure, let's not get crazy with this one.
Another way to get some extra space would be to move all the SVG
related stuff in its own plugin, that batik*.jar is around 2MB,
and also the PDF output is heavy, 1.1MB.
Maybe I'm over-reacting, but I still remember the pain of using
internet in South Africa
(not at FOSS4G 2008, before that).
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.