cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans>
Subject Re: Cocoon 2.2 - Build and deployment with Maven2
Date Sat, 17 Dec 2005 09:16:08 GMT

Jörg Schaible wrote:

>>> But how would it be possible to say that the samples block depends on
>>>  any implementation which implements a certain API, like the roles
>>> are used in Cocoon today? For example, my-block-samples-block needs
>>> an XSL:FO processor but does not depend on a concrete implementation
>>> (e.g. Xalan).
>> I don't think maven allows this at the moment. It's a valid usecase
>> though.
> You can define the dependency as optional (although this is partly still
> buggy).

Good point! I forgot all about this property.


I asked around on #maven about this. The general opinion there is that
if you have a project that can use multiple implementations of a
library, you should split up the project and make multiple poms for
this. Idea is that all optional libraries need to be redeclared by the
user using the pom they are declared in, not very user friendly.

So in effect this could be realized in the scheme


Both implA and implB include implBase as dependency and additionally
declare the implementation for the optional libraries. That way our
users would only need to point to implA or implB and can do so without
pom editing.


View raw message