You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|<imgsrc="images/Powered-by-artifactory_04.png"style="width:200px"/>|[Bndtools and Bnd build artifacts are hosted by JFrog Artifactory.](https://jfrog.com/open-source/)|
17
+
|<imgsrc="images/yourkit.png"style="width:200px"/>| YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of[Yourkit Java Profiler](https://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler) and [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/index.jsp) innovative and intelligent tools for profiling Java and .NET applications.|
There are several ways to add external bundles into your repository in order to make them available in your projects. The easiest way is to drag-and-drop from your native file management application (i.e. Windows Explorer, Mac Finder, etc) into the **Repositories** view in Bndtools. Note that you need to drop it onto a specific repository entry: usually the "Local Repository". Note that you can multi-select many bundle files and drag/drop them at the same time.
11
-
12
-

13
-
14
-
Importing the bundles this way is better than directly modifying the contents of the `cnf/repo` directory, since Bndtools is immediately aware of the new bundles and regenerates the OBR index for the repository.
15
-
16
-
**NB:** not all repository types support adding bundles! For example, the `OBR` repository type is based on an index file that may be anywhere local or remote; Bndtools would not know where to put the new bundle or how to update the index. However the following repository types *do* support additions:
17
-
18
-
*`LocalOBR`
19
-
*`FileRepo`
20
-
21
-
How Do I Remove Bundles from a Repository?
22
-
==========================================
23
-
24
-
Unfortunately the current repository API does not support a generic way to remove bundles. We plan to update this API, but for now it is necessary to remove the bundles manually from the filesystem.
25
-
26
-
For repositories of type `LocalOBR` perform the following steps:
27
-
28
-
1. Delete the bundle file from `<repo_dir>/<bsn>`. If you want to delete all versions of the bundle, then also delete the `<bsn>` directory itself (i.e., do not leave an empty directory).
29
-
2. Delete the OBR index file, `<repo_dir>/repository.xml`.
30
-
3. Touch the `cnf/build.bnd` file. This causes the index file to be regenerated and the repository contents to be refreshed.
31
-
32
-
For repositories of type `FileRepo`, perform the same steps except for deleting the OBR index (which will not exist anyway).
33
-
34
-
Why is My Bundle Empty?
35
-
=======================
36
-
37
-
In Bndtools the contents of a bundle must be defined explicitly; if the contents are not defined then the bundle will be empty. Bundle contents are defined using the following three instructions (follow links to the bnd documentation for these instructions):
38
-
39
-
*[`Private-Package`](http://www.aqute.biz/Bnd/Format#private-package) defines Java packages to be included in the bundle but not exported.
40
-
*[`Export-Package`](http://www.aqute.biz/Bnd/Format#export-package) defines Java packages to be both included in the bundle *and* exported.
41
-
*[`Include-Resource`](http://www.aqute.biz/Bnd/Format#include-resource) defines non-Java resource files (e.g. images, XML files etc) to be included in the bundle.
42
-
43
-
Note that both `Private-Package` and `Export-Package` may be edited using the *Contents* tab of the GUI editor. There is currently no GUI assistance for the `Include-Resource` instruction so it must be entered using the *Source* tab.
44
-
45
-
What's the Difference Between "-include" and "Include-Resource"?
The [`-include`](http://www.aqute.biz/Bnd/Format#directives) instruction is used to include a set of bnd instructions from another `.bnd` file into the current `.bnd` file. This can be useful if there are common settings or instructions used in multiple places.
49
-
50
-
The [`Include-Resource`](http://www.aqute.biz/Bnd/Format#include-resource) instruction tells bnd to include a set of non-Java resources (e.g. images, XML files etc) in the output bundle.
51
-
52
-
How Can I Configure the System Bundle Exports?
53
-
==============================================
54
-
55
-
To add extra packages to the exports of the OSGi System Bundle, use the `-runsystempackages` instruction to your run configuration file. For example:
56
-
57
-
-runsystempackages: sun.reflect
58
-
59
-
You can also add library JARs to the Java application "classpath" using the `-runpath` instruction, which would then allow you to expose the contents of those libraries via system bundle exports:
Note that using the `-runsystempackages` instruction is equivalent to setting the OSGi property `org.osgi.framework.system.packages.extra`; however it is better to use `-runsystempackages` because then the Run Requirements resolver inside Bndtools will take account of the availability of those packages during resolution.
65
7
66
8
How Can I Depend on a Plain JAR File at Build Time?
0 commit comments