Package io.fabric8.agent.mvn

Examples of io.fabric8.agent.mvn.MavenSettingsImpl


        root.getConnection().run(new IJMXRunnable() {
         
          @Override
          public void run(MBeanServerConnection connection) throws JMXException {
            // TODO REPLACE WITH BETTER JmxTemplateImpl...
            BrokerFacade facade = new RemoteBrokerFacade(connection);
            BrokerNode broker = new BrokerNode(root, facade, "Broker");
            root.addChild(broker);
          }
        });
      } catch (CoreException e) {
View Full Code Here


    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.activemq")) {
          BrokerFacade facade = new JmxTemplateBrokerFacade(new JmxPluginJmxTemplate(r.getConnection()));
          String brokerName = null;
          try {
            brokerName = facade.getBrokerName();
          } catch (Exception e) {
            ActiveMQJMXPlugin.getLogger().warning("Could not find Broker name: " + e, e);
          }
          if (brokerName == null) {
            brokerName = "Broker";
View Full Code Here

    if( parentElement instanceof IConnectionWrapper ) {
      IConnectionWrapper w = (IConnectionWrapper)parentElement;
      Root r = w.getRoot();
      if( r != null ) {
        if (r.containsDomain("org.apache.activemq")) {
          BrokerFacade facade = new JmxTemplateBrokerFacade(new JmxPluginJmxTemplate(r.getConnection()));
          String brokerName = null;
          try {
            brokerName = facade.getBrokerName();
          } catch (Exception e) {
            ActiveMQJMXPlugin.getLogger().warning("Could not find Broker name: " + e, e);
          }
          if (brokerName == null) {
            brokerName = "Broker";
View Full Code Here

        root.getConnection().run(new IJMXRunnable() {
         
          @Override
          public void run(MBeanServerConnection connection) throws JMXException {
            // TODO REPLACE WITH BETTER JmxTemplateImpl...
            BrokerFacade facade = new RemoteBrokerFacade(connection);
            BrokerNode broker = new BrokerNode(root, facade, "Broker");
            root.addChild(broker);
          }
        });
      } catch (CoreException e) {
View Full Code Here

        this.managedExtensionLibs  = new Properties(bundleContext.getDataFile("extension.properties"));
        this.managedEtcs = new Properties(bundleContext.getDataFile("etc.properties"));
        this.downloadExecutor = createDownloadExecutor();

        MavenConfigurationImpl config = new MavenConfigurationImpl(new PropertiesPropertyResolver(System.getProperties()), "org.ops4j.pax.url.mvn");
        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
        manager = new DownloadManager(config, getDownloadExecutor());
        fabricService = new ServiceTracker<FabricService, FabricService>(systemBundleContext, FabricService.class, new ServiceTrackerCustomizer<FabricService, FabricService>() {
            @Override
            public FabricService addingService(ServiceReference<FabricService> reference) {
                FabricService service = systemBundleContext.getService(reference);
View Full Code Here

        // Building configuration
        PropertiesPropertyResolver syspropsResolver = new PropertiesPropertyResolver(System.getProperties());
        DictionaryPropertyResolver propertyResolver = new DictionaryPropertyResolver(props, syspropsResolver);
        final MavenConfigurationImpl config = new MavenConfigurationImpl(propertyResolver, "org.ops4j.pax.url.mvn");
        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
        manager = new DownloadManager(config, getDownloadExecutor());
        Map<String, String> properties = new HashMap<String, String>();
        for (Enumeration e = props.keys(); e.hasMoreElements();) {
            Object key = e.nextElement();
            Object val = props.get(key);
View Full Code Here

    public static MavenConfiguration createMavenConfiguration(FabricService fabricService, Properties properties) {
        AgentUtils.addMavenProxies(properties, fabricService);
        PropertiesPropertyResolver propertiesPropertyResolver = new PropertiesPropertyResolver(System.getProperties());
        DictionaryPropertyResolver dictionaryPropertyResolver = new DictionaryPropertyResolver(properties, propertiesPropertyResolver);
        MavenConfigurationImpl config = new MavenConfigurationImpl(dictionaryPropertyResolver, "org.ops4j.pax.url.mvn");
        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
        return config;
    }
View Full Code Here

        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"));
View Full Code Here

        properties.setProperty("org.ops4j.pax.url.mvn.localRepository", systemRepoUri);
        properties.setProperty("org.ops4j.pax.url.mvn.repositories", remoteRepo);
        properties.setProperty("org.ops4j.pax.url.mvn.defaultRepositories", systemRepoUri);
        PropertiesPropertyResolver propertyResolver = new PropertiesPropertyResolver(properties);
        MavenConfigurationImpl mavenConfiguration = new MavenConfigurationImpl(propertyResolver, "org.ops4j.pax.url.mvn");
        mavenConfiguration.setSettings(new MavenSettingsImpl(mavenSettings.toURI().toURL()));
        return new DownloadManager(mavenConfiguration, Executors.newSingleThreadExecutor());
    }
View Full Code Here

     * Fetches archetype from the configured repositories
     * TODO: make this code available to hawt.io/JMX too
     */
    private File fetchArchetype(Archetype archetype) throws IOException {
        MavenConfigurationImpl config = new MavenConfigurationImpl(new PropertiesPropertyResolver(System.getProperties()), "org.ops4j.pax.url.mvn");
        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
        DownloadManager dm = new DownloadManager(config, Executors.newSingleThreadExecutor());

        final CountDownLatch latch = new CountDownLatch(1);
        final DownloadFuture df = dm.download(String.format("mvn:%s/%s/%s", archetype.groupId, archetype.artifactId, archetype.version));
        df.addListener(new FutureListener<DownloadFuture>() {
View Full Code Here

TOP

Related Classes of io.fabric8.agent.mvn.MavenSettingsImpl

Copyright © 2018 www.massapicom. 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.