I have some likely basic questions about features and bundles, and the
"features.xml" file. I'm doing some work on an existing codebase, where I
think much has been done to get things working, without complete understanding
of the machinery. I'd like to get an external perspective before I talk to
other devs in the project.
Our build has a bunch of "api" and "impl" modules. All of these modules use
the "maven-bundle-plugin", to at least specify the list of packages to export.
Some of the "impl" modules have "features.xml" files, but not all of them.
None of the "api" modules have them.
Many of the "features.xml" files in the "impl" modules have patterns like this
(this is in the "account-impl" module):
---------------------
<feature name='account' version='${pom.version}'>
<feature>base</feature>
<bundle>mvn:com.att.detsusl/account-api/${pom.version}</bundle>
<bundle>mvn:com.att.detsusl/db-impl/${pom.version}</bundle>
<bundle>mvn:com.att.detsusl/account-impl/${pom.version}</bundle>
<bundle>mvn:com.att.detsusl/acs-impl/${pom.version}</bundle>
---------------------
There are a few things to note here.
First, this "account" feature depends on both the "account-api" and
"account-impl" bundle, the latter of which is the bundle implemented in this
module itself. That doesn't seem to make any sense to me. Second, it also
depends on the "account-api" bundle. There is no "features.xml" in that
bundle. If there was, would this be able to specify a dependency as a feature
instead of a bundle? What would be the implications of that? This feature
also depends on other impl bundles, instead of the features they are defined
within. Is there ever any reason to depend directly on the bundles, instead of
the features?