FileOutputStream fout = new FileOutputStream("repository.xml");
RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
ModelledResourceManager modelledResourceManager = context().getService(ModelledResourceManager.class);
for (String fileName : bundleFiles) {
File bundleFile = new File(fileName);
IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
mrs.add(modelledResourceManager.getModelledResource(bundleFile.toURI().toString(), jarDir));
}
repositoryGenerator.generateRepository("Test repo description", mrs, fout);
fout.close();
}