It seems to work. Thanks for that. However, I think I found another problem related to Eclipse. Batik has a dependency to rhino:js:1.5R4.1, but cocoon-core has a dependency to rhino:js:1.6R5. When I build my block, or when I build from the root pom, Maven builds against 1.6R5 (it removes 1.5R4.1 from the classpath). This is correct.
But when I build the Eclipse descriptors, it adds rhino:js:1.5R4.1 to the classpath. That is wrong, IMO. It should add the dependency to rhino:js:1.6R5 (transitively trough cocoon-core's dependencies). You can see it for yourself by creating all the eclipse descriptors for trunk, and then opening the block cocoon-batik-impl (you'll see the wrong version of rhino:js on the classpath). Is this a known problem, or better, does anybody know how to solve this? Thanks, Bart. > -----Oorspronkelijk bericht----- > Van: Daniel Fagerstrom [mailto:[EMAIL PROTECTED] > Verzonden: dinsdag 19 december 2006 9:51 > Aan: [email protected] > Onderwerp: Re: [2.2] Duplicate (and different) versions of batik on > classpath > > I removed the dependency on batik-1.5-fop, thanks for spotting the > problem. I haven't done much testing yet, please report if there are any > problems. > > /Daniel > > Bart Molenkamp skrev: > > Hi, > > > > I found a problem with the cocoon-batik-impl block. When I add a > > dependency to this block, I end up with two different versions of Batik > > on my classpath. The first (and correct) one is batik-1.6-1. But due to > > a dependency to fop 0.20.5, batik-1.5-fop gets included (which is not > > compatible with batik-1.6-1). See the snippet below that I got when > > running maven with the -X option: > > > > batik:batik-squiggle:jar:1.6-1:compile (selected for compile) > > batik:batik-swing:jar:1.6-1:compile (selected for compile) > > batik:batik-transcoder:jar:1.6-1:compile (selected for compile) > > fop:fop:jar:0.20.5:compile (selected for compile) > > xml-apis:xml-apis:jar:1.0.b2:compile (removed - nearer found: > > 1.3.02) > > xerces:xercesImpl:jar:2.2.1:compile (removed - nearer found: > > 2.8.0) > > batik:batik-1.5-fop:jar:0.20-5:compile (selected for compile) > > > > When I run the webapp from the commandline, using the maven jetty > > plugin, everything seems to work fine. But when I run it in Eclipse > > (using the Jetty launcher plugin), I get classpath errors. > > > > First conflict I found was that of o.a.batik.dom.AbstractDocument.<init> > > (constructor signature changed in 1.6-1). After removing batik-1.5-fop > > jar from my classpath, I ran into another classpath problem. > > org.apache.cocoon.xml.dom.SVGBuilder accesses the protected member > > 'namespaces', which is of type org.apache.batik.dom.util.HashTableStack. > > The signature method 'put' has changed from 'put(String, Object)' to > > 'put(String, String)'. It looks like the cocoon-batik-impl block is > > built against batik-1.5-fop, and not batik-1.6-fop. > > > > When I exclude batik-1.5-fop as a dependency, everything seems to work > > fine (but I don't know what functionality of batik requires > > batik-1.5-fop). It worked either by excluding the dependency from > > cocoon-batik-impl's pom.xml (but I had to declare the exclusion several > > times), or when I exclude it from fop-0.20.5.pom (from my local > > repository). > > > > How can this problem be resolved? Anybody interested in the changed pom? > > > > Thanks, > > Bart. > > > >
