Properties properties = new Properties();
properties.setProperty("mvn.localRepository", home+"/.m2/repository/@snapshots");
properties.setProperty("mvn.repositories", "http://repo1.maven.org/maven2/,http://repository.jboss.org/nexus/content/groups/fs-public/,https://repo.fusesource.com/nexus/content/repositories/ea");
PropertiesPropertyResolver propertyResolver = new PropertiesPropertyResolver(properties);
MavenConfigurationImpl mavenConfiguration = new MavenConfigurationImpl(propertyResolver, "mvn");
mavenConfiguration.setSettings(new MavenSettingsImpl(getClass().getResource("maven-default-settings.xml")));
DownloadManager manager = new DownloadManager(mavenConfiguration, Executors.newFixedThreadPool(2));
Map<URI, Repository> repositories = new HashMap<URI, Repository>();
AgentUtils.addRepository(manager, repositories, URI.create("mvn:org.apache.karaf.assemblies.features/standard/" + System.getProperty("karaf-version") + "/xml/features"));