I write a tapestry servlet which will load component
jars in WEB-INF/lib directory into specification. A
component jar is a jar with tapestry information
packaged in META-INF/MANIFEST.MF. For example 


 Manifest-Version: 1.0
 
 Name: Tapestry
 Library-Id: contrib
 Library-Path:
/org/apache/tapestry/contrib/Contrib.library
 

Where Tapestry is the entry name, Library-Id defines
library id, and Library-Path defines classpath of
library file.

The servlet will try to find such information, but it
will ignore the library id already defined. So if
component jars have same Library-Id defined, we can
still override the value in tapestry.application file.

I think even people do not like to use this servlet to
load component jars, it is still a good practice to
have information defined in the jar manifest. I like
to add more attributes such as,
Tapestry-Version: the version supported by the
component library;
Library-Version: version of the library itself.

These kind of information may not be used at runtime,
but it certainly can help dev tools.


Yunfeng Hou

--- Kevin Menard <[EMAIL PROTECTED]> wrote:

> 
> On Jul 25, 2005, at 2:13 PM, Marcus Brito wrote:
> 
> > Kevin Menard <kmenard <at> servprise.com> writes:
> >
> >
> >> What do you propose should happen when two JARs
> set the same  
> >> Tapestry-
> >> Component-Library value?
> >>
> >
> > Hmm, that would be tricky. How about loading only
> the first one  
> > found, and issue
> > warnings about any duplicate namespaces?
> 
> This would most certainly cause confusion.
> 
> > A second option would be to detect this
> > situation *before* loading any library, and loudly
> complain about  
> > it (i.e.,
> > throw an exception) if there are duplicate
> namespaces.
> 
> This would result in a case where two component libs
> cannot be used  
> unless the two authors coordinate on who uses what
> namespace.  Even  
> if it was configurable, you'd lose the "works
> out-of-the-box" feature.
> 
> I think a convention for namespace claiming would be
> more  
> appropriate, although I'm not sure what that
> convention would be.
> 
> -- 
> Kevin
> 
> 


                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to