Paul Duffin <[EMAIL PROTECTED]> writes:

> I have been looking at having separate poms for API and implementation
> and bundle. I can build the bundle (just think JAR if you don't know
> what that is) by aggregating the classes/resources from the API and
> implementation into one directory and then using standard plugins to
> create it. The problem I have with this is that while building I want
> to have dependencies on the API poms (as the Java compiler does not
> know about OSGi bundle exports) but when installing and running I want
> to have dependencies on the bundle.
>
> Does anyone else use this sort of structure, if so how do you manage
> this in Maven ?
>
> Is there anyway to do what I want ?

Hello,
I am not sure I fully understand your problem, and I am not familiar
with OSGi bundles, so let me rephrase it:
 - you have a component C that is broken down into an interface I and
   an implementation P. You only need I at compile time but need P at
   runtime. 
 - from a maven perspective, this would mean that you would have
   astructure like that

-- C 
   +-- pom.xml
   |
   +-- I 
       +-- pom.xml
       +-- src ....
   +-- P
       +-- pom.xml
       +-- src
   +-- src/main/assembly ...

Then I would configure C to build:
 - I as a standard artifact deployed in a "public" repo: Other
   projects would then be allowed to depend on it
 - P as a standard artifact but deployed in a "private" repo not
   available outside the team producing it
 - C as a pom and with an OSGi bundle (what I call assembly above)
   deployed and available publicly.

Then client components/programs could depend on I for compiling and on
C's bundle for running, using a profile.

HTH
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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

Reply via email to