Thanks for the great help so far everyone.
So far I've managed to build the component I made and generate a .xinfo file using the ant meta task.
My next task is to actually run the hello block. I've made a block.xml file just like the example in the tutorial. What's the next step?
Two options:
(a) a package block (b) a standalone block
A packaged block (a jar file containing a block.xml file) is basically a convenience approach. The alternative (and IMO cleaner approach) is to create a standalone block definition. The standalone block is just a XML file that contains the <container> definition and the <classloader> includes a reference to the artifact and its dependencies.
Here is an example of running merlin with a standalone block:
$ merlin -execute block:merlin/tutorial/hello
What this is doing is the following:
1. locate a file named merlin/tutorial/blocks/hello.block 2. create a container model based on the block definition 3. add the model to the root container 3. deploy the container
It seems that I should make a .jar that includes the block.xml and my HelloComponent .class file. Then I need to satisfy the block dependencies:
<repository> <resource id="avalon-framework:avalon-framework-impl" version="4.1.5"/> </repository>
Including a block.xml is not necessary - its just convenient if you want to reference a jar file instead of a standalone block definition. Also - just for reference - embedded block xmls are not used in jar files established in a classloader (they only come into play if your referencing a jar via the command line or as a <include> statement inside a <container>.
I think what I need is another file that lists resources, so that merlin can find them? Where can I find a description of that file, and how can I generate it? This link seems to be what I'm looking for (ant version of course ;):
http://avalon.apache.org/util/plugin/index.html
I can't seem to find the avalon:artifact goal. That page refers to an "avalon plugin", which seems to be different from both the avalon meta plugin and the merlin plugins, both of which are distributed with the release...
Any more pointers please?
Generally speaking you should not need to deal with the util plugin - it basically build meta info about classloaders - which is used for constructing plugins. Instead you just need to declare the dependent jar files in your blocks <classloader> and that's about it.
Stephen.
Justin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
|---------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org | |---------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
