How can install the pax url handler in felix?
This project is managed by maven and is starting felix as follows:
FrameworkFactory frameworkFactory = ServiceLoader.load(FrameworkFactory.class).iterator().next();
framework = frameworkFactory.newFramework(configMap);
System.out.println("Starting OSGi Framework");
framework.start();
In the pom file, I included the pax-url-mvn:1.2.5 dependency.
The botton line is enabling the bundle installation via maven protocol.
Thank you.
You can't have it from the very start, as it's an OSGi bundle. But you can take an approach like the Apache Karaf server did. Start it as one of the first OSGi Bundles, make sure it does have a low start-level (the first time this is actually use-full) and make sure all of your other bundles which need the mvn url handler to be started with a higher start-level. For example have the pax-url handler on start-level 2 add the logging on sl 5 and your own bundles on sl 20 or higher, make sure you have some other "infrastructural" bundles between the pax-url bundle and the ones which need the mvn protocol for installing.