c6d507b5969cf4e22d153e11fd6b237d757e2093
wiki/typical-development-scenarios.md
| ... | ... | @@ -16,6 +16,18 @@ Add a New Library which can not be found in any SAP Repository |
| 16 | 16 | • The admin of the central p2 repository (currently at sapsailing.com) must now replace the content of the central server /home/trac/p2-repositories/sailing with the content of the new local base p2 repository (com.sap.sailing.targetplatform/base/gen/p2) |
| 17 | 17 | * Reload the target platform in the IDE |
| 18 | 18 | |
| 19 | +## Adding or Upgrading Bundles from a p2 Repository |
|
| 20 | + |
|
| 21 | +The Eclipse p2 handling is sometimes mysterious. Listing the plugins in a repository doesn't seem to be supported by the Eclipse UI. However, not always do we want to add entire features; sometimes, just a list of bundles would do. The following command, executed on the command line, executed from your Eclipse installation directory, can help you find the right bundles and their versions to add textually to the *.target definition file: |
|
| 22 | + |
|
| 23 | + `java -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -debug -consolelog -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/luna/ -list` |
|
| 24 | + |
|
| 25 | +Note that you may have to adjust the exact file name and version number of the equinox launcher JAR file according to your installed Eclipse version. |
|
| 26 | + |
|
| 27 | +From the list shown, pick the bundle you need and add it to the `*.target` file, as in |
|
| 28 | + |
|
| 29 | + `<unit id="org.apache.felix.gogo.runtime" version="0.10.0.v201209301036"/>` |
|
| 30 | + |
|
| 19 | 31 | ## Adding an Existing Remote p2 Repository as New Source of Libraries |
| 20 | 32 | * Add the URL of the remote p2 repository to all target definition files in com.sap.sailing.targetplatform/defintions |
| 21 | 33 | * Select the features of the p2 repository you want to use in the project |