IntroductionThis document will describe the process for creating your first block. There are essentially three steps that must be completed before your block is ready for assembling.
Writing the Block component
Writing the Block is the main task you will be called to do. It follows all
the rules of writing a standard Avalon component. If a block implements the
Contextualizable interface it will be passed an instance of
The block can implement an interface if it wishes to export a service to external blocks. It is
also possible to aquire services from other blocks in the
Write the BlockInfoYou must create this file to indicate which services this Block depends upon and those services which it offers. It is more fully documented in the BlockInfo Specification document. Create the jar packageThe final step is packaging up the implementation files, BlockInfos and other resources into a jar file. The jar file is a standard jar file with special manifest entries. For each Block that is included in the jar, a new manifest attribute must be added, namely "Avalon-Block: true". An example manifest file is displayed below. Manifest-Version: 1.0 Created-By: Apache Avalon Project Name: com/biz/cornerstone/blocks/MyBlock.class Avalon-Block: true |