Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Eclipse Kura Bundle project with Maven
Eclipse Kura Bundle project with Maven [message #1715708] Wed, 25 November 2015 11:23 Go to next message
Said Ucar is currently offline Said UcarFriend
Messages: 56
Registered: June 2015
Member
Hi,

I want to develop a bundle for Kura (works on RaspberryPi) with Maven but I couldn't find a good document or tutorial for this purpose. Can I modify my existing project to Maven, or should I start a fresh project?

Thanks,
Mustafa.
Re: Eclipse Kura Bundle project with Maven [message #1715741 is a reply to message #1715708] Wed, 25 November 2015 15:54 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello Mustafa,

If you want to simply automate your bundle creation using Maven, you should be able to convert your existing project. I would reference the pom files used in the Kura examples [1]. The tycho-packaging-plugin is the plugin that will create the bundle.

If you are trying to use tools such as bndtools, I would search this forum. There are several people using this approach to create bundles for Kura.

I hope this answers your question, if not let me know.

[1] https://github.com/eclipse/kura/blob/develop/kura/examples/org.eclipse.kura.demo.heater/pom.xml

Thanks,
--Dave
Re: Eclipse Kura Bundle project with Maven [message #1715745 is a reply to message #1715741] Wed, 25 November 2015 16:03 Go to previous messageGo to next message
Said Ucar is currently offline Said UcarFriend
Messages: 56
Registered: June 2015
Member
Hello David,

Thank you again for your answer. I already checked existing demo project that you refference, and also the examples in base kura repository[1]. My real purpose is, I love maven dependency feature while writing Spring Framework projects. It was really easy to use repositories in a project. In Kura bundle project, I have to include external jar files to my plugin.jar as you know. I just wonder can maven download jar files and add classpath automatically.

[1] https://github.com/eclipse/kura/tree/develop/kura/examples

Thanks
Mustafa
Re: Eclipse Kura Bundle project with Maven [message #1716694 is a reply to message #1715745] Mon, 07 December 2015 15:12 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Mustafa,

Yes, Maven can do these things for you. Including the external jar will depend on where the jar is located, but Maven has plugins to do nearly any tasks related to downloading, copying, or moving files. Creating the bundle with the appropriate classpath will depend on if you are using the Tycho plugin as we do in Kura or if you use a tool such as bndtools. In Kura, we create and edit the bundle Manifest files manually. The Maven plugin uses these Manifests to create the OSGi bundles. The Manifest file is where you would specify your classpath. The Kura core bundle Manifest [1] is an example of doing this. Here, we include the external Paho MQTT client jar file in the bundles classpath.

[1] https://github.com/eclipse/kura/blob/develop/kura/org.eclipse.kura.core/META-INF/MANIFEST.MF

Thanks,
--Dave
Re: Eclipse Kura Bundle project with Maven [message #1817534 is a reply to message #1715708] Mon, 25 November 2019 14:27 Go to previous message
Domenico Francesco Bruscino is currently offline Domenico Francesco BruscinoFriend
Messages: 1
Registered: November 2019
Junior Member
Hi,

In the smart-solar-heating-system repository [1] there is a project using the tycho-maven-plugin.

In the Kura repository there is an example [2] using Apache Felix Maven Bundle Plugin [3] that is based on the BND tool [4].

[1] github.com/brusdev/smart-solar-heating-system/tree/master/gateway
[2] github.com/eclipse/kura/tree/develop/kura/examples/bnd_examples/org.eclipse.kura.demo.bnd.heater
[3] felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html
[4] bnd.bndtools.org/

Thanks,
Domenico
Previous Topic:Kura WatchDog
Next Topic:How to get advertisement data via new "BluetoothLeAdapter"
Goto Forum:
  


Current Time: Mon Nov 04 08:52:25 GMT 2024

Powered by FUDForum. Page generated in 0.03167 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top