Reinhard Poetz wrote:
Giacomo Pati wrote:

In Reinhards document it is META-INF/block.xml on the Wiki it's COB-INF/block.xml. So we need to make a decision:-)

Please use META-INF/block.xml, AFAIK we agreed on making our blocks valid JAR files.

Any zip file with jar extension and /META-INF/MANIFEST.MF entry is valid jar file. Presence of COB-INF can not make jar file invalid.


The skeleton in my tutorial should be compiled and packaged to an archive having following content:

/JAR-FILE-ROOT
 +-com
 | +-mycompany
 |   +-blocks
 |     +-myblock
 |       +-MyCocoonAction.class
 +-META-INF
 | +-block.xml
 |   +-com
 |   +-mycompany
 |     +-blocks
 |       +-myblock
 |         +-pom.xml
 +-cocoon-app
   +-sitemap.xmap
   +-test.xml

Please move block resource files (xmap, xml, etc) into COCOON-INF, or COB-INF, or some such directory, so that:

 a) It is more prominent that these files are not part of
    'cocoon-app' Java package

 b) It is more consistent with other J2EE jars (APP-INF, WEB-INF)

 c) Naming conflict (when user has cocoon-app package) is impossible

 d) Class loader can be configured to filter out our FOO-INF directory


If we follow the default Maven directory structure as outlined in my tutorial, the archive will be created automatically for us.

Now to answer your question ;) the position of the .xconf of a block is defined in the components element of block.xml.


Ok, looking at [1] it is defined in the block.xconf file, which is located in COB-INF (or WEB-INF or META-INF respectively). Is that still correct?

I'm not sure where block.xconf should go to. I'd put it under cocoon-app and not under META-INF. WDOT?

META-INF is fine, I think.

Vadim