Examples of PropertiesPropertyResolver


Examples of io.fabric8.agent.mvn.PropertiesPropertyResolver

        this.managedEndorsedLibs  = new Properties(bundleContext.getDataFile("endorsed.properties"));
        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) {
View Full Code Here

Examples of io.fabric8.agent.mvn.PropertiesPropertyResolver

        addMavenProxies(props, fabricService.getService());

        updateStatus("analyzing", null);

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

Examples of io.fabric8.agent.mvn.PropertiesPropertyResolver

    /**
     * Creates a {@link io.fabric8.agent.mvn.MavenConfiguration} based on the specified {@link java.util.Properties}.
     */
    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

Examples of io.fabric8.agent.mvn.PropertiesPropertyResolver

        System.setProperty("karaf.home", new File("target/karaf").getAbsolutePath());
        String home = System.getProperty("user.home");
        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));
View Full Code Here

Examples of io.fabric8.agent.mvn.PropertiesPropertyResolver

            properties.putAll(props);
        }
        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

Examples of io.fabric8.agent.mvn.PropertiesPropertyResolver

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

Examples of org.jboss.metadata.property.PropertiesPropertyResolver

        DeploymentUnit current = deploymentUnit;
        final List<PropertyResolver> propertyResolvers = new ArrayList<PropertyResolver>();
        do {
            final Properties deploymentProperties = current.getAttachment(Attachments.DEPLOYMENT_PROPERTIES);
            if (deploymentProperties != null) {
                propertyResolvers.add(new PropertiesPropertyResolver(deploymentProperties));
            }
            current = current.getParent();
        } while (current != null);

        if (!propertyResolvers.isEmpty()) {
View Full Code Here

Examples of org.jboss.metadata.property.PropertiesPropertyResolver

        DeploymentUnit current = deploymentUnit;
        final List<PropertyResolver> propertyResolvers = new ArrayList<PropertyResolver>();
        do {
            final Properties deploymentProperties = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_PROPERTIES);
            if (deploymentProperties != null) {
                propertyResolvers.add(new PropertiesPropertyResolver(deploymentProperties));
            }
            current = current.getParent();
        } while (current != null);

        if (!propertyResolvers.isEmpty()) {
View Full Code Here

Examples of org.ops4j.util.property.PropertiesPropertyResolver

public class Handler extends URLStreamHandler  {
    @Override
    protected URLConnection openConnection( final URL url ) throws IOException {
        final MavenConfigurationImpl config = new MavenConfigurationImpl(
                new PropertiesPropertyResolver( System.getProperties() ), "org.ops4j.pax.url.mvn");

        config.setSettings( new MavenSettingsImpl( config.getSettingsFileUrl(), config.useFallbackRepositories() ) );
        return new Connection( url, config );
    }
View Full Code Here

Examples of org.ops4j.util.property.PropertiesPropertyResolver

        // no-op
    }

    public static MavenConfigurationImpl createConfig() {
        final MavenConfigurationImpl config = new MavenConfigurationImpl(
                new PropertiesPropertyResolver( System.getProperties() ), "org.ops4j.pax.url.mvn");

        config.setSettings( new MavenSettingsImpl( config.getSettingsFileUrl(), config.useFallbackRepositories() ) );
        return config;
    }
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.