Vadim Gritsenko wrote:
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.

no, but previously we had the idea of putting our classes into /COB-INF/classes which would result in an invalid jar(AFAIU).

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

you mean, renaming cocoon-app to COCOON-INF? Fine for me :-)

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.

this leads to another problem (my example is simplified and doesn't use Daniel's latest suggestions):

<block>
 <sitemap href="block-sitemap.xmap"/>
 <components href="block.xconf"/>
</block>

Both, the sitemap and the component configuration contain relative paths but they are resolved differently.

Ideas?

--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                       web(log): http://www.poetz.cc
--------------------------------------------------------------------

        

        
                
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de