How to build a Bundle-Repository

This Blog shows how to build your own Bundle-Repository

Step one: create a directory with the following structure containing the bundle files in sub-directory plugins.

<directory-name>
  features
  plugins

Step two: create a file named category.xml in the directory.
Contents of category.xml:

<?xml version="1.0" encoding="UTF-8"?>
<site>
  <category-def name="all" label="P2 Batik 1.13 Repo"/>
  <iu>
    <category name="all"/>
    <query><expression type="match">providedCapabilities.exists(p | p.namespace == 'osgi.bundle')</expression></query>
  </iu>
</site>

Step three: execute these two commands
these are only samples: you have two pick up the correct launcher version for your eclipse installation and also change paths for your local directory and the output directory.

java -jar /home/adiinfo/eclipse/birt-flugtiger_master/eclipse/plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:/home/adiinfo/eclipse/localbirt/repository -artifactRepository file:/home/adiinfo/eclipse/localbirt/repository -source /home/adiinfo/eclipse/batik1_13 -configs gtk.linux.x86_64 -compress -publishArtifacts

/home/adiinfo/eclipse/birt-flugtiger_master/eclipse/eclipse -debug -consolelog -nosplash -verbose -application org.eclipse.equinox.p2.publisher.CategoryPublisher -metadataRepository file:/home/adiinfo/eclipse/localbirt/repository -categoryDefinition file:/home/adiinfo/eclipse/batik1_13/category.xml

Step four: make this directory available on a Web-Server

Now you can access the Repository in Eclipse like this:
https://<web-server-address>/<directory-name>/repository


0 Kommentare

Schreiben Sie einen Kommentar

Avatar placeholder

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.