http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
Adding OSGi metadata to existing projects without changing the packaging type
If you want to keep your project packaging type (for example "jar") but would like to add OSGi metadata
you can use the manifest goal to generate a bundle manifest. The maven-jar-plugin can then be used to
add this manifest to the final artifact. For example:
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
If you want to use packaging types other than "jar" and "bundle" then you also need to enable support
for them in the bundleplugin configuration, for example if you want to use the plugin with WAR files:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<instructions>
<!-- ...etc... -->
</instructions>
</configuration>
</plugin>
分享到:
相关推荐
In this course, you will learn to build projects that will help developers achieve a sound understanding of the engine when it comes to building games. This course can help you build on your ...
This book includes topics such as rollover navigation menus without scripts, adding audio and video, rounded corners, drop shadows, adding PayPal services, and much more. It also includes sections on ...
In this course, you will learn to build projects that will help developers achieve a sound understanding of the engine when it comes to building games. This course can help you build on your ...
标题“Taking the pain out of adding a horizontal scrollbar to a listbox”指向的就是这样一个问题:如何优雅地为列表框添加水平滚动条,以提升用户体验。这里我们将详细探讨这个主题,并提供一些实践技巧。 ...
- FIX: The PointOnLine() function calulations have "single" type numbers overflow problem (changed to "double"). - FIX: The pfJoin and pfClose flags incorrectly calculates in GetEditPathCaps(). ...
安装Mysql-python时报错Adding Python Information to the Windows Registry 需要使用register.py cmd python register.py
Android, the next-generation open mobile platform from Google and the Open Handset Alliance, is poised to become a significant player in the mobile device market. The Android platform gives developers...
The race to lead the world in 5G is underway and China, South Korea and other nations are competing to win. They understand that wireless leadership means billions in economic growth and millions of ...
8 Adding More Metrics to Gain a Better Understanding 9 Putting It All Together in a Professional Way Classification Task Build Real World Apps – Who Will Win the Next UFC 10 Collecting Possible ...
The vision is “To produce the best UNIX-like operating system package possible, with due respect to the original software tools ideology as well as usability, performance and stability.” The ...
In this course, you will learn to build projects that will help developers achieve a sound understanding of the engine when it comes to building games. This course can help you build on your ...
Adding Password Management to Your Templates(cloudstack)
supplementary features of existing libraries, almost all of the examples in this book were rewritten at least partially. Nevertheless, to support programmers who still use “old” C++ environments, ...
5. **Default Methods in Interfaces:** This feature allows interfaces to have default implementations for their methods, which helps in adding new methods to existing interfaces without breaking ...
To get the most out of it, you should have a firm grasp of modern JavaScript and some knowledge of how to work with relational databases and the command line. I explain new and interesting bits of ...
Add "SQLITE_ENABLE_COLUMN_METADATA" to the list of preprocessor definitions. Repeat for each configuration (debug/release/Win32/x64). How to make the SQLITE.EXE command-line utility There are ...