Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kura-dev] Convert Kura bundles to Maven or Ant project

Hello Jay,

Let me try to restate your question and let me know if I have it correct. You have developed a few Kura applications using the Eclipse IDE and would now like to build and package these applications into bundles from the command line. Is that correct?

If so, I would certainly recommend using Maven. There are two main approaches you can use that are based on Maven plugins:

1. Tycho based build: This is primarily what Kura uses for building its bundles. This follows what is known as a “Manifest First” approach, meaning you manually create and manage your MANIFEST.MF files. If you have been following Kura documentation, this is likely what you have been doing. For this approach, you don’t need to list Kura dependencies in your pom since they are listed in your Manifest file. The tricky part about Tycho builds is they don’t use a standard Maven repository for artifacts, instead it uses a P2 repository. If you are using the Kura user workspace, the P2 repository is already there (target-definition). You simply need to point your pom file to this repo. An example of this is in the Kura build [1]. Just search for the <repositories> sections and look sections with <layout>p2</layout>. We are also experimenting with hosting the P2 [2], but this is yet to be documented.

2. BND Tools: This approach is know as “Pom First”, where your MANIFEST.MF file is generated for you based on dependencies in your pom.xml file. I don’t have a good Kura example of this, but could create one if you decide to go this route. 

Hopefully this will get you on the right track. Let me know if you have further questions.


Thanks,
--Dave


On Oct 27, 2016, at 20:49, Chetty, Jay <jay.chetty@xxxxxxxxx> wrote:

Hi,
 
I have few Kura bundles that I would like to convert to maven so that I can build them all from the command line.
So far I have installed maven eclipse plugin and converted each bundle to maven.
But the Kura dependencies (the jar files in the Kura workspace’s target-definition) are not automatically added to the maven pom.xml file that is generated.
I have also tried manually adding the dependencies using the system scope and providing the full path to the jar file (which seems not a good way to do).
Even with this I see errors while building the bundle, the errors like “org.osgi.service.event does not exist”.
 
I have tried Tycho pom file generator with no success, it also just creates basic pom.xml files and leaves out the dependencies.
 
It doesn’t have to be MAVEN, I can also use ANT if there is an easy way to do it.
 
Thanks
+Jay
_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev


Back to the top