@@ -0,0 +1,2125 @@
+/*%0A * Copyright 2016 Donald W - github@donaldw.com%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage io.mypojo.test;%0A%0Aimport io.mypojo.framework.launch.ClasspathScanner;%0Aimport io.mypojo.framework.launch.PojoServiceRegistry;%0Aimport io.mypojo.framework.launch.PojoServiceRegistryFactory;%0Aimport io.mypojo.jcl.JarClassLoader;%0Aimport org.osgi.framework.Bundle;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.ServiceLoader;%0A%0A/**%0A * @author donald-w%0A */%0Apublic class FeaturesTest %7B%0A    private static Logger logger = LoggerFactory.getLogger(FeaturesTest.class);%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A%0A        JarClassLoader jc = new JarClassLoader();%0A%0A        jc.add(%22./target/features-repo/io/mypojo/test/bundles/bundle1/0.0.4-SNAPSHOT/bundle1-0.0.4-SNAPSHOT.jar%22);%0A        jc.add(%22./target/features-repo/io/mypojo/test/bundles/bundle2/0.0.4-SNAPSHOT/bundle2-0.0.4-SNAPSHOT.jar%22);%0A//        jc.add(%22./target/features-repo/io/mypojo/test/bundles/bundle3/0.0.4-SNAPSHOT/bundle3-0.0.4-SNAPSHOT.jar%22);%0A%0A        Map config = new HashMap();%0A        config.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, new ClasspathScanner().scanForBundles(jc));%0A%0A        ServiceLoader%3CPojoServiceRegistryFactory%3E loader = ServiceLoader.load(PojoServiceRegistryFactory.class);%0A%0A        PojoServiceRegistry registry = loader.iterator().next().newPojoServiceRegistry(config);%0A%0A        Bundle%5B%5D bundles = registry.getBundleContext().getBundles();%0A%0A        logger.debug(%22Sleeping for a bit%22);%0A        Thread.sleep(2000);%0A    %7D%0A%7D%0A

Rename file