> -----Original Message-----
> From: Marco Tedone [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 20, 2003 5:59 PM
>
> Am I correct if I say that under api one should write the
> interfaces/exceptions, while under impl one should write the
> actual classes?

Sure.

> If so, in a real project, shouldn't the jar include both the
> interfaces/exceptions and implementation classes? If so, I imagine at a
> certain point I would have something:
>
> /api
>     /target
>         Interface1.class
>         Interface2.class
>         Exception1.class
>         Exception2.class
>         ...
> /impl
>     /target
>         Interface1_Impl.class
>         Interface2_Impl.class
>         ...
>
> All of this should be grouped in an armonic jar (i.e.
> template-1.0.jar).

Well, I beg to differ in this. I only just started out using merlin and
already I find its clean separation of api, spi (where appropriate) and impl
very helpful. And in my view its conceptually cleaner than stuffing those
into one big jar. While api and spi define the external and internal
contracts impl provides *one* out of possibly many realizations.

What's more, by handing users of your code (i.e. other team members) only
api packages you forego the temptation of using internal methods which are
not part of the official api but specific to your implementation.

> How could I obtain this result? How could I tell the build process to
compile
> both the classes under api and impl and to build a jar from the two
> different /target folders?

I honestly don't know, yet I have the strong impression that doing so what
contravene the very objective of the template project. Of course, this is
just my 2 ct, others might think differently.

Cheers,

Olaf


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to