i am running karaf 2.3.1 with a single main feature file called
main-1.0-featurea.xml in its *deploy* directory that bears a single feature
entry. the file looks like this:

<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0";
name="main-1.0-features">
     <feature name="main" version="1.0" resolver="(obr)">
          <bundle.....
          <bundle.....
     </feature>
<feature>

 karaf starts up fine, and all bundles within that main feature file are
properly recognized by the container.

i then created another feature file called aux1-feature. it references the
main feature file like so:

<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0";
name="aux1-1.0-features">
     <feature name="aux1" version="1.0" resolver="(obr)">

          *<feature version=1.0>main<feature>*

          <bundle.....
          <bundle.....
     </feature>
<feature>

i placed it in the same *deploy* directory along-side the main feature file.
yet upon start up, karaf complains about the aforementioned reference by
stating that main feature cannot be found. why isn't it able to resolve this
simple and obvious reference?

i went ahead and moved the main feature file under
/system/foo/blah/main/1.0, then appended its reference
*mvn:com.foo.blah/main/1.0/xml/features* to the *featuresRepositories* param
in org.apache.karaf.features.cfg file. this time, start up completed fine,
and i can see both main and aux1 features being properly deployed.

but now i stumbled upon yet another problem. if i were to place additional
feature files (aux2, aux3....auxN) in *deploy* directory, all referencing
the main feature, karaf goes back to complaining that it cannot find the
main feature. why is it that a single feature can reference the main
feature, but more than one results in the error?

finally, i think i was able to resolve the issue by replacing each *<feature
version=1.0>main<feature>* entry with
*<repository>mvn:com.foo.blah/main/1.0/xml/features</repository>*. now all
aux features are deploying properly. yet i am still puzzled as to why
aforementioned behavior was exhibited. was i doing something wrong?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/multiple-feature-files-in-karaf-2-3-1-tp4031977.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to