maven-bundle-plugin

When using “bundle” packaging with maven-bundle-plugin goals are executed twice

拜拜、爱过 提交于 2019-12-10 16:07:41
问题 I have a (simple) maven project with packaging type "bundle" using org.apache.felix:maven-bundle-plugin:2.5.4 . It produces a correct OSGI bundle jar. However i observe that all goals are executed at least twice . How do i prevent this? Problem is that some goals (checkstyle in this example) are slow so duplicate execution is a problem here. NOTE : I use maven 3.2.5 from the command line. Output or mvn clean install (removed all irrelevant info). Notice that many plugins are executed 4 times.

<Export-Package> for all resources using maven-bundle-plugin

守給你的承諾、 提交于 2019-12-05 14:00:44
As a temporary measure to be able to transition quickly to OSGi I need to create a single jar with all my libraries in it. What i did was put all the jar libraries in src/main/resources so they end up in the root of the created jar. The problem i am having is telling the maven-bundle-plugin to export ALL the packages in the jars. So basically, i want to expose all my libraries to other OSGi bundles This is the first thing I tried in my POM <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration>

How to include a jar of dependency in an OSGi bundle using maven bundle plugin?

与世无争的帅哥 提交于 2019-12-04 11:31:21
I have an OSGi compliant bundle(jar), in which I want to add a jar of a dependency. The dependecy I want to add is of a Database Driver. That jar is not present in the lib folder of the Karaf container which I am using, and there is no way of adding it there manually. I have access only to the deploy folder, where I can deploy my bundles. I am using maven bundle plugin to package my bundle. So, I wanted to know whether there is a way to add the dependency jar in my bundle. Currently, I am adding the jar manually to the bundle by opening the bundle in 7zip and adding the jar by copying it in

Why (and in favor of what) are maven-bundle-plugin's wrap/bundleall goals deprecated?

强颜欢笑 提交于 2019-11-30 18:51:23
http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-2.3.7/doc/site/wrap-mojo.html says bundle:wrap is deprecated, same with bundle:bundleall . I currently use wrap to create an OSGi bundle from a non-OSGi dependency, as described at http://www.lucamasini.net/Home/osgi-with-felix/creating-osgi-bundles-of-your-maven-dependencies . What should they be replaced by and what's the reason for the deprecation? The alternative is to just use the bundle:bundle goal, then in your pom.xml configure the plugin similar to the following: <plugin> <groupId>org.apache.felix</groupId> <artifactId

Why (and in favor of what) are maven-bundle-plugin's wrap/bundleall goals deprecated?

末鹿安然 提交于 2019-11-30 16:51:37
问题 http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-2.3.7/doc/site/wrap-mojo.html says bundle:wrap is deprecated, same with bundle:bundleall . I currently use wrap to create an OSGi bundle from a non-OSGi dependency, as described at http://www.lucamasini.net/Home/osgi-with-felix/creating-osgi-bundles-of-your-maven-dependencies. What should they be replaced by and what's the reason for the deprecation? 回答1: The alternative is to just use the bundle:bundle goal, then in your pom

How to handle Import-Package entries which come from jars on the Bundle-Classpath?

岁酱吖の 提交于 2019-11-29 15:01:22
I have put a few jars on my Bundle-Classpath. The line below shows the entry in my pom.xml, which uses the Felix plugin to create the manigest.mf for the bundle. <Bundle-ClassPath>.,lib/com.springsource.org.h2-1.0.71.jar,lib/com.springsource.org.apache.lucene-2.3.2.jar,lib/com.springsource.org.apache.lucene.search-2.3.2.jar</Bundle-ClassPath> These jars have classes which import packages, but from what I can see, they all have a MANIFEST.MF, which has it's own (accurate) list of Import-Package statements. However, when I build my project (using Maven and the bundle plugin), it reports an error

Should I use POM first or MANIFEST first when developing OSGi application with Maven?

限于喜欢 提交于 2019-11-28 19:33:15
There are two main approaches when developing an OSGi application with Maven: POM-first and MANIFEST first. I'm looking for an answer that is in a form of a table that shows pros and cons of each method. To be more specific, I would also like to know how it relates to: Maturity of toolset Vendor independence Development ease (which includes finding people who can do the development on the tooling) Compatibility Avoiding ClassNotFound Avoiding manual work At present this is what I can come up with POM-First Pros (using maven-bundle-plugin) Leverages existing Maven skills, repositories and

How to handle Import-Package entries which come from jars on the Bundle-Classpath?

你离开我真会死。 提交于 2019-11-28 08:49:20
问题 I have put a few jars on my Bundle-Classpath. The line below shows the entry in my pom.xml, which uses the Felix plugin to create the manigest.mf for the bundle. <Bundle-ClassPath>.,lib/com.springsource.org.h2-1.0.71.jar,lib/com.springsource.org.apache.lucene-2.3.2.jar,lib/com.springsource.org.apache.lucene.search-2.3.2.jar</Bundle-ClassPath> These jars have classes which import packages, but from what I can see, they all have a MANIFEST.MF, which has it's own (accurate) list of Import