>>>>> Kerry <karaf-u...@avionicengineers.com>:

> I have a feeling I've asked this already but I think the plug-in
> options are aimed at building a KAR? I just want to create a features
> file with the included feature dependencies. I think the only way to
> do this is to provide a template features XML file?

I tried just now, and it looks like you're right.

I took this config, which creates a feature file attachment to a bundle
maven artifact
 https://github.com/steinarb/post-body-capture/blob/master/pom.xml#L189
and added the following to the <configuration>:
                    <features>
                        <features>pax-http-whiteboard</features>
                    </features>

Then I bumped the karaf version from 4.1.2 to 4.1.3 (to be sure I had
the newest Java 8 compatible version).

And then I removed the template feature.xml:
 
https://github.com/steinarb/post-body-capture/blob/master/src/main/feature/feature.xml

Then I tried a "mvn clean install".

The generated target/feature/feature.xml file does not have
pax-http-whiteboard as a feature dependency:
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"; 
name="post-body-capture">
     <feature name="post-body-capture" description="Servlet dumping POSTed data 
to files" version="1.0.0.SNAPSHOT">
         <bundle 
start-level="80">mvn:no.priv.bang.debug-utils/post-body-capture/1.0.0-SNAPSHOT</bundle>
     </feature>
 </features>


> I was going to see if I can tweak the karaf-maven-plugin to do as I
> want. Would this be of interest as a possible PR?

I would be interested in using this, er..., feature at least..:-)
(bye-bye to the template feature.xml files)

(Perhaps a Jira issue should be created before submitting the PR?)

Reply via email to