avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@apache.org>
Subject RE: [transit] update on the refactored repository package
Date Sun, 12 Sep 2004 17:25:23 GMT


> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@hedhman.org]
> Sent: 12 September 2004 11:38
> To: Avalon Developers List
> Subject: Re: [transit] update on the refactored repository package
> 
> On Sunday 12 September 2004 13:55, Stephen McConnell wrote:
> 
> > Have just about finished a refactored version of repository.  It's
> > smaller, cleaner, and most importantly - more futureproof.  Unlike
the
> > current implementation, the package is broken down into two
sub-projects
> > - main and plugin.
> 
> Sounds like a great job. Can't wait to see the code materialize inthe
> subversion repo...
> 
> But I am wondering if there is one more step needed, or if that is
> overkill;
> 
> You say that the metro-transit-plugin handles the command-line
arguments
> as
> well as a repository cache controller. Wouldn't it make a LOT of sense
of
> separating these, so that other applications can create there own
> command-line parsing, but have the repository controller as-is,
without
> fokkering around with Metro Transit code?

I'm handling this concern by setting the cli parser to stop on
unrecognized options.  This results in the parser chewing its way
through the controller args until a non-recognized option is found.  The
non-recognized option and all subsequent options are available as
arguments to plugins and resources loaded by the controller.

Example:

$ metro -load plugin:somegroup/something#1.0.0 -xyz abc

In the above case the '-xyz' option is not recognized, so we end up with
'-xyz' and all subsequent cli values as a parameter for loaded plugins.
A more practical example would be something like:

$ metro -load plugin:avalon/merlin/avalon-merlin-impl#3.3.0 widget.block

In the above case widget.block is recognized as unrecognized and will be
supplied as a possible constructor argument to the merlin plugin.

> It is a bit hard to get the picture without some diagrams and code :o)

That's life!

Cheers, Steve.


> 
> Cheers
> Niclas
> --
>    +------//-------------------+
>   / http://www.bali.ac        /
>  / http://niclas.hedhman.org /
> +------//-------------------+
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org


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


Mime
View raw message