Gert,
Thanks very much. Is there an example anywhere for the generate-
features-xml goal?
Here's what I'm trying:
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>features-maven-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate-features-xml</goal>
</goals>
<configuration>
<kernelVersion>1.1.0</kernelVersion>
<!--
<bundles>target/classes/bundles.properties</
bundles>
-->
</configuration>
</execution>
</executions>
</plugin>
Is the format of the <bundles> file just a list of bundles in the
form: groupId/artifactId/version/type?
I was hoping that this goal would generate a feature for my project's
artifact. However, the behavior seems to be the following:
- Create a feature for every direct dependency of the current project.
- Add direct dependencies to list of known bundles as they are
processed.
- Find bundles that implement the feature bundle's package
requirements from the list of known bundles, and add those bundles to
the feature definition.
- Attach the generated XML file as an artifact of the project
Is this accurate? Is there anyway to create a features configuration
for the project's artifact?
Also, the automatic bundle discovery seems to only look at the the
first level of transitive dependencies. Is that correct?
Thanks,
Jim
On Apr 28, 2009, at 3:44 PM, Gert Vanthienen wrote:
Jim,
I'm afraid there's no documentation on the features-maven-plugin
currently -- making a note on my todo list now to do it soon if nobody
beats me to it.
Currently, the plugin has two goals that are more or less useful:
- add-features-to-repo allows you to seed a maven repository with all
the bundles required for a given set of features - it can help you
build your own package/distribution. For an example, look at the
features/assembly pom.xml
- generate-features-xml generates a features.xml file for a given
maven artifact, by looking into the OSGi imports for the artifacts and
figuring out which bundles to add for satisfying all the requirements
For the near future, we're planning to add:
- a validate goal to validate a features.xml file for consistency (do
all the bundles exist, have all the OSGi imports been met...)
- goals to install/uninstall features using the JMX Features MBean
that's in ServiceMix Kernel.
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
2009/4/28 Jim Breen <[email protected]>:
Is there any documentation for the features-maven-plugin? I see an
example
of how it's used in the SMX4 pom.xml, but I'd like to know more
about it's
capabilities.
Thanks for any info,
Jim