tjwatson commented on issue #52: URL: https://github.com/apache/felix-atomos/issues/52#issuecomment-1119032856
> I'm not sure if I'm misunderstanding what you wrote, but it seems like you're describing how to add extra modules. My problem is that I actually want to _reduce_ the set of modules that are initially available (and then add my own layers afterwards using the `addLayer` mechanism you've described). That is, I want to stop Atomos from automatically bringing in everything that was on the initial module path of the JVM. By default Atomos will install everything it discovers on the module path into the AtomosLayer called the bootLayer (`Atomos.getBootLayer()`) You can control that by specifying an Atomos config option `org.apache.felix.atomos.Atomos.ATOMOS_CONTENT_INSTALL` See https://github.com/apache/felix-atomos#connected-bundles ```java Atomos atomos = Atomos.newAtomos(); // Set atomos.content.install to false to prevent automatic bundle installation Framework framework = atomos.newFramework(Map.of("atomos.content.install", "false")); // framework must be initialized before any bundles can be installed framework.init(); List<Bundle> bundles = new ArrayList<>(); for (AtomosContent content: atomos.getBootLayer().getAtomosContents()) { // FILTER OUT WHAT YOU DON'T WANT INSTALLED HERE // The resulting bundle will use a bundle location of // "atomos:" + atomosContent.getAtomosLocation(); bundles.add(content.install()); } for (Bundle b : bundles) { b.start(); } // The installed bundles will not actually activate until the framework is started framework.start(); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
