Package org.apache.karaf.features.internal

Examples of org.apache.karaf.features.internal.RepositoryImpl.load()


   
    public void testShowWrongUriInException() throws Exception {
        String uri = "src/test/resources/org/apache/karaf/shell/features/repo1.xml";
        RepositoryImpl r = new RepositoryImpl(new URI(uri));
        try {
            r.load();
        } catch (Exception e) {
            assertTrue(e.getMessage().contains(uri));
        }
    }
}
View Full Code Here


   
    public void testShowWrongUriInException() throws Exception {
        String uri = "src/test/resources/org/apache/karaf/shell/features/repo1.xml";
        RepositoryImpl r = new RepositoryImpl(new URI(uri));
        try {
            r.load();
        } catch (Exception e) {
            assertTrue(e.getMessage().contains(uri));
        }
    }
}
View Full Code Here

   
    public void testShowWrongUriInException() throws Exception {
        String uri = "src/test/resources/org/apache/karaf/shell/features/repo1.xml";
        RepositoryImpl r = new RepositoryImpl(new URI(uri));
        try {
            r.load();
        } catch (Exception e) {
            assertTrue(e.getMessage().contains(uri));
        }
    }
}
View Full Code Here

   
    public void testShowWrongUriInException() throws Exception {
        String uri = "src/test/resources/org/apache/karaf/shell/features/repo1.xml";
        RepositoryImpl r = new RepositoryImpl(new URI(uri));
        try {
            r.load();
        } catch (Exception e) {
            assertTrue(e.getMessage().contains(uri));
        }
    }
}
View Full Code Here

    protected void addAvailableFeaturesFromProfile(Collection<Feature> allFeatures, FabricService fabric, Profile overlay) throws Exception {
        for (String repoUriWithExpressions : overlay.getRepositories()) {
            String repoUri = VersionPropertyPointerResolver.replaceVersions(fabric, overlay.getConfigurations(), repoUriWithExpressions);
            RepositoryImpl repo = new RepositoryImpl(URI.create(repoUri));
            repo.load();
            allFeatures.addAll(Arrays.asList(repo.getFeatures()));
        }
    }

    protected Feature findFeatureWithBundleLocationPrefix(Iterable<Feature> allFeatures, String prefix) {
View Full Code Here

            //We are using the file uri instead of the maven url, because we want to make sure, that the repo can load.
            //If we used the maven uri instead then we would have to make sure that the download location is added to
            //the ops4j pax url configuration. Using the first is a lot safer and less prone to misconfigurations.
            RepositoryImpl repo = new RepositoryImpl(file.toURI());
            repositories.put(uri, repo);
            repo.load();
            for (URI ref : repo.getRepositories()) {
                addRepository(manager, repositories, ref);
            }
        }
    }
View Full Code Here

            FeatureValidationUtil.validate(file.toURI());
            //We are using the file uri instead of the maven url, because we want to make sure, that the repo can load.
            //If we used the maven uri instead then we would have to make sure that the download location is added to
            //the ops4j pax url configuration. Using the first is a lot safer and less prone to misconfigurations.
            RepositoryImpl repo = new RepositoryImpl(file.toURI());
            repo.load();
            for (URI ref : repo.getRepositories()) {
                download(ref.toString());
            }
            return repo;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.