Stefano Mazzocchi wrote:
Reinhard Poetz wrote:

More information and explanations can be found at http://wiki.apache.org/cocoon/CocoonBlockBuilder


[not critizing, just curious] can you explain why you think that having block/lib is going to be jar hell while lib/block is not?

I would really like to see block/lib instead of lib/block but without Pier's shielding classloader I don't see how we do NOT end in jar versioning hell.


Following situation:

Block A uses betwixt-0.5.jar, block B uses betwixt-0.6.jar and you want to run both blocks in the same web application. Without shielding it's not possible to use libraries separatly.

My temporary solution is using a library repository that only contains one betwixt jar:

<jars>
  <file id="betwixt">
    <title>Jakarte Commons Betwixt</title>
    <description>
      ...
    </description>
    <used-by>Cocoon</used-by>
    <lib>blocks/betwixt-0.6</lib>
</jars>

The descriptor of block A looks like this:

<block id="http://bla/blockA";>
  <name>block A</name>

  <libraries>
    <lib id="betwixt" location="core"/>
  </libraries>

</block>

for block B

<block id="http://bla/blockB";>
  <name>block B</name>

  <libraries>
    <lib id="betwixt" location="core"/>
  </libraries>

</block>

This way only one betwixt version can be used and if e.g. block B uses the outdated version 0.5 it wouldn't compile any more. I know far from being perfect, but maybe you or others have ideas how we can solve this problem in a better way.

--
Reinhard

Reply via email to