Package org.eclipse.tycho.p2.facade.internal

Examples of org.eclipse.tycho.p2.facade.internal.TychoP2RuntimeLocator


                    continue;
                }
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("P2resolver.addMavenArtifact " + artifact.toString());
                }
                resolver.addMavenArtifact(new ArtifactFacade(artifact));
            }
        }

        for (ArtifactRepository repository : project.getRemoteArtifactRepositories()) {
            try {
View Full Code Here


                 */
                if (logger.isDebugEnabled()) {
                    logger.debug("P2TargetPlatformResolver: Using existing metadata of " + artifact.toString());
                }

                resolutionContext.addArtifactWithExistingMetadata(new ArtifactFacade(artifact), new ArtifactFacade(
                        p2Data.p2MetadataXml.artifact));

                /*
                 * Since the p2artifacts.xml exists on disk, we can add the artifact to the (global)
                 * p2 artifact repository view of local Maven repository. Then, the artifact is
                 * available in the build.
                 */
                // TODO this should happen in resolution context
                p2ArtifactsInLocalRepo.addProject(new GAV(artifact.getGroupId(), artifact.getArtifactId(), artifact
                        .getVersion()));

            } else if (!p2Data.p2MetadataXml.isAvailable() && !p2Data.p2ArtifactsXml.isAvailable()) {
                /*
                 * The POM dependency has not been built by Tycho. If the dependency is a bundle,
                 * run the p2 bundle publisher on it and add the result to the resolution context.
                 */
                if (logger.isDebugEnabled()) {
                    logger.debug("P2resolver.addMavenArtifact " + artifact.toString());
                }

                resolutionContext.publishAndAddArtifactIfBundleArtifact(new ArtifactFacade(artifact));

            } else {
                failDueToPartialP2Data(artifact, p2Data);
            }
        }
View Full Code Here

                        }
                    }
                } else {
                    if (!configuration.isIgnoreTychoRepositories() && !session.isOffline()) {
                        try {
                            MavenRepositoryReader reader = plexus.lookup(MavenRepositoryReader.class);
                            reader.setArtifactRepository(repository);
                            reader.setLocalRepository(session.getLocalRepository());

                            String repositoryKey = getRepositoryKey(repository);
                            TychoRepositoryIndex index = repositoryCache.getRepositoryIndex(repositoryKey);
                            if (index == null) {
                                index = new DefaultTychoRepositoryIndex(reader);
View Full Code Here

    public void setupProjects(MavenSession session, MavenProject project, ReactorProject reactorProject) {
        TargetPlatformConfiguration configuration = (TargetPlatformConfiguration) project
                .getContextValue(TychoConstants.CTX_TARGET_PLATFORM_CONFIGURATION);
        List<Map<String, String>> environments = getEnvironments(configuration);
        Set<Object> metadata = generator
                .generateMetadata(new ReactorArtifactFacade(reactorProject, null), environments);
        reactorProject.setDependencyMetadata(null, metadata);

        // TODO this should be moved to osgi-sources-plugin somehow
        if (isBundleProject(project) && hasSourceBundle(project)) {
            ReactorArtifactFacade sourcesArtifact = new ReactorArtifactFacade(reactorProject, "sources");
            Set<Object> sourcesMetadata = sourcesGenerator.generateMetadata(sourcesArtifact, environments);
            reactorProject.setDependencyMetadata(sourcesArtifact.getClassidier(), sourcesMetadata);
        }
    }
View Full Code Here

        for (ReactorProject otherProject : reactorProjects) {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("P2resolver.addMavenProject " + otherProject.getId());
            }
            projects.put(otherProject.getBasedir(), otherProject);
            resolver.addReactorArtifact(new ReactorArtifactFacade(otherProject, null));

            Map<String, Set<Object>> dependencyMetadata = otherProject.getDependencyMetadata();
            if (dependencyMetadata != null) {
                for (String classifier : dependencyMetadata.keySet()) {
                    resolver.addReactorArtifact(new ReactorArtifactFacade(otherProject, classifier));
                }
            }
        }

        if (dependencies != null) {
View Full Code Here

    public void setupProjects(MavenSession session, MavenProject project, ReactorProject reactorProject) {
        TargetPlatformConfiguration configuration = (TargetPlatformConfiguration) project
                .getContextValue(TychoConstants.CTX_TARGET_PLATFORM_CONFIGURATION);
        List<Map<String, String>> environments = getEnvironments(configuration);
        Set<Object> metadata = generator
                .generateMetadata(new ReactorArtifactFacade(reactorProject, null), environments);
        reactorProject.setDependencyMetadata(null, metadata);

        // TODO this should be moved to osgi-sources-plugin somehow
        if (isBundleProject(project) && hasSourceBundle(project)) {
            ReactorArtifactFacade sourcesArtifact = new ReactorArtifactFacade(reactorProject, "sources");
            Set<Object> sourcesMetadata = sourcesGenerator.generateMetadata(sourcesArtifact, environments);
            reactorProject.setDependencyMetadata(sourcesArtifact.getClassidier(), sourcesMetadata);
        }
    }
View Full Code Here

        for (ReactorProject otherProject : reactorProjects) {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("P2resolver.addMavenProject " + otherProject.getId());
            }
            projects.put(otherProject.getBasedir(), otherProject);
            resolutionContext.addReactorArtifact(new ReactorArtifactFacade(otherProject, null));

            Map<String, Set<Object>> dependencyMetadata = otherProject.getDependencyMetadata();
            if (dependencyMetadata != null) {
                for (String classifier : dependencyMetadata.keySet()) {
                    resolutionContext.addReactorArtifact(new ReactorArtifactFacade(otherProject, classifier));
                }
            }
        }

        if (dependencies != null) {
View Full Code Here

        try {
            File repositoryLocation = new File(module.getBuild().getDirectory(), "targetPlatformRepository");
            repositoryLocation.mkdirs();
            FileOutputStream stream = new FileOutputStream(new File(repositoryLocation, "content.xml"));
            try {
                MetadataSerializable serializer = osgiServices.getService(MetadataSerializable.class);
                Set<?> targetPlatformInstallableUnits = TychoProjectUtils.getTargetPlatform(module)
                        .getNonReactorUnits();
                serializer.serialize(stream, targetPlatformInstallableUnits);
            } finally {
                stream.close();
            }
            return repositoryLocation;
        } catch (IOException e) {
View Full Code Here

        try {
            File repositoryLocation = new File(module.getBuild().getDirectory(), "targetPlatformRepository");
            repositoryLocation.mkdirs();
            FileOutputStream stream = new FileOutputStream(new File(repositoryLocation, "content.xml"));
            try {
                MetadataSerializable serializer = osgiServices.getService(MetadataSerializable.class);
                Set<?> targetPlatformInstallableUnits = TychoProjectUtils.getTargetPlatform(module)
                        .getNonReactorUnits();
                serializer.serialize(stream, targetPlatformInstallableUnits);
            } finally {
                stream.close();
            }
            return repositoryLocation;
        } catch (IOException e) {
View Full Code Here

            if (proxy.isActive()) {
                activeProxies.add(proxy);
            }
        }

        ProxyServiceFacade proxyService;
        proxyService = framework.getService(ProxyServiceFacade.class);
        // make sure there is no old state from previous aborted builds
        logger.debug("clear OSGi proxy settings");
        proxyService.clearPersistentProxySettings();
        for (Proxy proxy : activeProxies) {
            logger.debug("Configure OSGi proxy for protocol " + proxy.getProtocol() + ", host: " + proxy.getHost()
                    + ", port: " + proxy.getPort() + ", nonProxyHosts: " + proxy.getNonProxyHosts());
            proxyService.configureProxy(proxy.getProtocol(), proxy.getHost(), proxy.getPort(), proxy.getUsername(),
                    proxy.getPassword(), proxy.getNonProxyHosts());
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.tycho.p2.facade.internal.TychoP2RuntimeLocator

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.