aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emily Jiang <>
Subject [Discussion] Provide an OBR repository generator
Date Tue, 08 Mar 2011 22:37:46 GMT
In Apache Aries, our resolver is able to take in any external repositories.
It is also able to generate repository xml by using the following code
snippet (lifted from the module of application itest, *By the way, the repository xml generated by
apache aries includes the blueprint service/reference infomation, which
cannot be achived by bindex (a repository generator).*

private void generateOBRRepoXML(boolean nullURI, String ... bundleFiles)
throws Exception
    Set<ModelledResource> mrs = new HashSet<ModelledResource>();
    FileOutputStream fout = new FileOutputStream("repository.xml");
    RepositoryGenerator repositoryGenerator =
    ModelledResourceManager modelledResourceManager =
    for (String fileName : bundleFiles) {
      File bundleFile = new File(fileName);
      IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
      String uri = "";
      if (!!!nullURI) {
        uri = bundleFile.toURI().toString();
      mrs.add(modelledResourceManager.getModelledResource(uri, jarDir));
    repositoryGenerator.generateRepository("Test repo description", mrs,

In order to get a repository xml, end users have to write the code snippet
above, which is not ideal. I propose to provide a jar file containing all
classes needed to generate the repository. The end user will just execute
the jar file and pass in the location of bundles in order to generate a
repository xml.

At the moment, the classes required for generating repository files are in
the modules of org.apache.aries.application.utils,
org.apache.aries.application.api, org.apache.aries.application.modeller,
org.apache.aries.obr.resolver, org.apache.aries.blueprint, felix bundle
repository. However, I don't want to duplicate the classes due to future
maintence concern.

Any suggestions on how we can best achive this.

Emily Jiang

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message