cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: [RT] Flattening trunk
Date Sun, 25 Sep 2005 20:16:15 GMT
Daniel Fagerstrom wrote:

>> So this means roughly 3 same-level directories per block right?
>>
>> For example:
>>
>> 1)org.apache.cocoon.lucene
>> -> mavenized, osgi enabled Real Block or Bundle
>> -> Exported to m2 repo
>>
>> 2)org.apache.cocoon.lucene.samples
>> -> mavenized, non-osgi block with sitemap resources and java sources.
>> -> Explicit pom dependency on 1)
>> -> Not exported to the m2 repository
>>  
>>
> Yes, IIRC, we decided a while ago to have samples as separate blocks.
> Carsten have allready done this for the portal. For the sample block I
> think it will be a OSGi bundle and real block as well. It will have an
> block.xml that describes where the sitemap is (and possibly other
> things) and it will export sitemap functionality that will be mounted at
> a certain point in the URI space.

Ok got it now.

>> 3)org.apache.cocoon.lucene.test
>> -> mavenized, non-osgi block with (unit)tests for 1)
>> -> Explicit pom dependency on 1)
>> -> Not exported to the m2 repository
>>  
>>
> For unit tests I'm not certain about the best way to solve it. I think
> that it might become unpractical to manage them without using OSGi, as
> OSGi takes care about the classloading for blocks that depend on other
> blocks, without OSGi we have to simulate its classloading behaviour. OTH

I forgot about the special requirements that OSGi dependency resolution
has. Yes, it will become mighty unpractical and a waste of energy to try
and manage this ourselves.

> if we use OSGi, the block will need to export all packages that it want
> to unit test, if the tests are in a separate block, this kills
> isolation. Maybe we can have the unit tests inside the block and be able
> to remove them when exporting to the M2 repo? Are there any "design
> patterns" for unit testing Eclipse plugins that we can reuse?

IIUC, m2 supports this layout with the <testSourceDirectory/> and
<testOutputDirectory/> elements.

> For functional tests it makes sense to have a separate test block that
> test the block from the "outside". Knopflerfish have a JUnit bundle that
> supports such testing
> http://www.knopflerfish.org/releases/1.3.3/jars/junit/junit_all-1.0.0.html,
> http://www.knopflerfish.org/releases/1.3.3/jars/junit_runner/junit_runner_all-1.0.0.html.

I hope m2's unittest implementation is pluggable, otherwise this sounds
like a good candidate for an m2 plugin.



Jorg
(with a note to self: start reading up on OSGi!)


Mime
View raw message