I think what Jochen is trying to convey is that you are leaving it entirely up 
to the developers to assure that the api/client jar can be used without the 
contents of the impl jar.  There is nothing in the build system stopping 
developers from putting a subclass of an implementation class in the api jar, 
thus making the api jar completely useless as a guide to an "api".

If you make separate projects for the api and implementation, the build system 
will prevent you from doing this.  It is definitely less convenient for 
developers to have to deal with 2 projects, but you get enforcement of the 
principle that the api is usable without implementation classes from the build 
system, not from developers possibly remembering to think.

In extreme cases where the build system doesn't enforce any separation rules 
you get projects like tomcat which build all their classes together and then 
partition them into jars that have circular uses relationships so that it is 
impossible to build them individually in any order.  My experience is that if 
you rely on developers you can set something up that initially works but good 
intentions quickly give way to expedience and very quickly your intended 
separation has disappeared.  I'm now willing to put up with a really lot of 
build system annoyance to get it to enforce this kind of separation.

hope I haven't made this thread too long...
thanks
david jencks
On Apr 20, 2011, at 2:45 AM, xanadu72 wrote:

> Jochen,
> I agree with you. The isolation is achieved for "external" usage but not
> between the api and the implementation. It is not the recommended way to
> distribute framework libraries but i find it more suitable for multi tier
> application to reduce the configuration management work load.  In this
> context the API is not intended to provided a way to implement multiple
> implementations. The term api can be replaced with client.
> 
> On Wed, Apr 20, 2011 at 11:34 AM, jochen-2 [via Maven] <
> [email protected]> wrote:
> 
>> On Wed, Apr 20, 2011 at 11:28 AM, xanadu72 <[hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4315334&i=0&by-user=t>>
>> wrote:
>> 
>>> The client api is a separate artifact. You can reuse it as you want. In
>> your
>>> repository you will get in the same release folder two artifacts :
>> 
>> That's completely understood. But as a separate jar file, you should
>> ensure that it is compilable without any of the other classes. For
>> example, it might accidentally import something from the rest of the
>> packages. You don't get that safety by just repackaging a bunch of
>> class files in another jar file.
>> 
>> 
>> --
>> I Am What I Am And That's All What I Yam (Popeye)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to