avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject [magic] block automation
Date Thu, 01 Jul 2004 14:31:51 GMT

Just a note to let everyone know that I've added a BlockTask to Magic. 
The task provides support for the automatic generation of a container 
directive.  The following example is taken from cornerstone connection 
impl project (package names shorted for clarity):

   <target name="build" depends="standard.build">
     <x:block name="connection" embed="MAIN">
       <x:service source="manager"
       <x:component name="manager"

The above target results in the generation of the of two block 
definitions - one standalone, and the other embedded in the jar file 
produced by the project.

<?xml version="1.0" encoding="ISO-8859-1"?>

<container name="connection">

     <service type="o.a.a.c.services.connection.ConnectionManager">


   <component name="manager" profile="default"


Basically the magic contribution is the generation of the classloader 
information based on the transitive dependencies resolved from the 
index.  In addition to the above the block task also handles the 
declaration of multiple include directives and will soon have support 
for nested container directives.

One thing we could be doing is to make a distinction between jar file 
references in the classloader directive that are assumed to be available 
and jar files that are required as part of the implementation.  For 
example the publication of ConnectionManager assumes that the class (and 
all dependent classes are available within the containing classloader). 
  It would not take a lot of effort to evolve things to the point where 
we could make the block definition more precise by declaring 
prerequisites as part of the block spec based on the magic project 
dependency declarations.

Also - we are starting to get to the point where we have a reasonable 
amount of information about a particular component available to us. 
Given the graph of all projects contributing to a given project - its 
not unreasonable to determine automatically if a version bump is 
required.  In effect if there is a version change in any of the 
dependents then we have at least a micro version bump in this component. 
  We can probably go further and figure out if the version change is to 
our components api or implementation - etc. - etc.  Using the same 
information - there is a reasonably solid amount of information that 
could be used to automate the generation of documentation about the 

Finally - I have a suspicion that with adoption of some specific 
policies in svn, chances are we would be able to track back and get 
release information and start thinking about tasks that handle release 

Cheers, Steve.


| Magic by Merlin                       |
| Production by Avalon                  |
|                                       |
| http://avalon.apache.org              |

To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message