gradle-karaf-plugin
gradle-karaf-plugin copied to clipboard
project dependency does not have a version
I have bnd project consisting of 3 sub-projects. one sub project is the karaf "feature" project, the two other projects are my provider bundle and application bundle.
the build.gradle of the "feature" project contains the following dependencies:
dependencies { iot project(':com.iotapp.provider') iot project(':com.iotapp.application') mqtt 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1' }
karaf { features { name = "${project.name}-${version}" xsdVersion = '1.3.0' outputFile = file("${project.buildDir}/karaf/features/${project.name}-feature.xml") includeProject = false;
feature {
name = 'iotapp'
description = 'iot message processing'
configurations 'mqtt', 'iot'
feature 'scr'
}
} }
When I run the gradle generateFeatures it generates the following feature xml:
as you can see in the last two bundles no version is added.
Do you have a sample project to share ? that would speed up my investigation :)
I have created a sample project. You can clone it from: https://github.com/elpinjo/featureSample.git
I never tested the plugin against bnd stuffs so it may require more time to check if there is any bug but what I've noticed is that your projects do not have aversion defined, could you do so and test it again ?
Explicitly setting the version in gradle.properties works, however, this version will not endup in my OSGI bundles as bnd uses its version from the workspace. I'm trying to get these to link together, but don't know how yet as my experience is lacking a bit in the field of bnd and gradle.
The plugin relies on gradles's dependency resolution so if gradle doesn't know the version the plugin doesn't too.
Unfortunately I never worked with such combination so I can't help much.
If you find a way I'd really be happy if you can send a PR to the readme so others can benefit.