avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Talevi <mauro.tal...@aquilonia.org>
Subject Re: about cornerstone
Date Sun, 04 May 2003 17:47:31 GMT
Stephen McConnell wrote:
> > 
> 
> I must confess that it is an annoying subject.  In the case of a project 
> like cornerstone threads we have basically one interface class and one 
> implementation class.  It certainly feels like overkill to have all of 
> these project structures around just to keep Maven happy.  On the 
> otherhand, all of Maven logic holds true - both impl and api projects 
> have different versions, dependencies, names, etc.

do they? if so then one should actually make them two different 
projects, but to me it does not feel like it is needed in the case of
cornerstone blocks.
I see the point of having a complete separation between api and impl
when you have a fatter api - say the servlet api or others.
and you have a lot of ways of implementing this api.
then you would have a project to define the api - usually via a
specification, and separate projects that implement it.
but here does it really hurt anybody to have the same version, names
and even dependency in the api and impl?
Also, if you have two implementations of the api you would have to 
create another project?  And would have to invent another name other 
than impl.  Just seems a bit overengineered.  Unless one sees from the
beginning the necessity to have multiple implementations which have
completely different dependencies, etc ...
Then you would have to have a cornerstone-x-default project for the
default implementation of block x and add implementation projects as 
required.

In any case I would push the case with the maven folks to allow multiple
artifacts, at least as far as jars are concerned.
The other scenario I had posted on the maven list was the separation of
rmi stubs in a separate jar.  Now that is a build-time artifact and you
cannot put in a separate codebase.

> I'm currently doing so sub-project post goals to copy classes from the 
> target builds up to the parent project under which a jar is created - 
> but this less than optimal becasue the dependency info is inconsistent.  
> I think the real solution is a plug-in that takes an api project and an 
> implementation project are generates a merged jar with a manfest derived 
> from the combined dependencies of the two.

That's a possibility - ie to relate different projects with different 
types (api and impl).  Surely something for the maven todo list.

But for the moment how would you propose to create a combined jar if you
create separate projects?  Some people would find it annoying to have to
include api and impl jars for all the cornerstone blocks.

> I see a couple of problems with this approach - firstly the impl version 
> and the api version need to be different.  Secondly, the api manifest 
> generation isn't going to correctly reflect the api jar dependencies.

I accept that they issues are there but I consider them the lesser of 
the two evils compared to the api/impl separation.
At least for small artifacts such as cornerstone blocks.

A matter of personal taste - I guess :-)

Cheers, Mauro



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


Mime
View raw message