All,
I am looking at replacing our proprietary build system with Maven
and need some help working out how to do this.
The main problem that I have is that in a subsystem (broadly our
equivalent of a Maven pom) we have separate API and implementation
source trees. Other subsystems that depend on this can only use the API
to compile against but can use the implementation to run against. We
typically create OSGi bundles from these subsystems and they are
configured so that only the API is visible from outside the bundle.
Maven does not support that use case and so I have to decide how best to
represent this structure. The easiest way is just to combine the API and
implementation, however I do not really want to do this because we lose
what we consider valuable protection against misuse of private classes.
I don't think that I can make Maven support this use case directly
within a single pom for a couple of reasons. Firstly, the dependency
management is in the core of Maven and is not controlled by a plugin,
and secondly while multiple source directories are supported the
compiler and jar plugins only appear to support a single directory for
all the classes.
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 ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]