-
Notifications
You must be signed in to change notification settings - Fork 313
Adding a new bundle to Kura
Marcello Rinaldo Martina edited this page Dec 1, 2021
·
3 revisions
Adding a new Kura bundle to the Kura distribution requires:
- Add the project itself to the
kura
directory. As an example we will use theorg.eclipse.kura.filesystem.logprovider
bundle. - Add the project to the
<modules>
list inkura/pom.xml
.
Example:<module>org.eclipse.kura.log.filesystem.provider</module>
- In
kura/distrib/config/kura.build.properties
add the bundle and Maven version to the list.
Example:org.eclipse.kura.log.filesystem.provider.version=1.0.0-SNAPSHOT
- Edit
kura/distrib/pom.xml
:- Add the dependency to the
artifactItem
list.
Example:<artifactItem> <groupId>org.eclipse.kura</groupId> <artifactId>org.eclipse.kura.log.filesystem.provider</artifactId> <version>${org.eclipse.kura.log.filesystem.provider.version}</version> </artifactItem>
- Add the file to the
move
list.
Example:<move file="target/plugins/org.eclipse.kura.log.filesystem.provider.jar" tofile="target/plugins/org.eclipse.kura.log.filesystem.provider_${org.eclipse.kura.log.filesystem.provider.version}.jar" />
- Do the same to the
copy
list. If you need to have this bundle in the emulator or the dev-env, then edit the proper sections.
- Add the dependency to the
- Edit
kura/distrib/src/main/ant/build_equinox_distrib.xml
:- Add an antcall with the
config
reference.
Example:<!-- Filesystem log provider bundle config --> <antcall target="filesystem-logprovider-config" />
- Add an antcall for the
jar
reference.
Example:<antcall target="filesystem-logprovider-jar" />
- Add a zip entry to one of the
jar
targets.
Example:<target name="filesystem-logprovider-config"> <propertyfile file="${project.build.directory}/${build.output.name}/config.ini"> <entry key="osgi.bundles" operation="+" value=", reference:file:${kura.install.dir}/${kura.symlink}/${plugins.folder}/org.eclipse.kura.log.filesystem.provider_${org.eclipse.kura.log.filesystem.provider.version}.jar@4:start" /> </propertyfile> </target> <target name="filesystem-logprovider-jar"> <zip destfile="${project.build.directory}/${build.output.name}.zip" update="true"> <zipfileset file="${project.build.directory}/plugins/org.eclipse.kura.log.filesystem.provider_${org.eclipse.kura.log.filesystem.provider.version}.jar" prefix="${build.output.name}/${plugins.folder}" /> </zip> </target>
- Add an antcall with the
Old resource also suggests to:
- Add a copy to one of the
jar-win
targets. - Edit
karaf/features
. - Add this bundle with its maven coordinates to one of the features (runtime, core, linux).
User Documentation: https://eclipse-kura.github.io/kura/. Found a problem? Open a new issue or start a discussion.