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

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


    public static TargetDefinitionFile read(File file) throws IOException {
        FileInputStream input = new FileInputStream(file);
        try {
            return new TargetDefinitionFile(parser.parse(new XMLIOSource(input)));
        } catch (XMLParseException e) {
            throw new TargetDefinitionSyntaxException("Target definition is not well-formed XML: " + e.getMessage(), e);
        } finally {
            IOUtil.close(input);
        }
    }
View Full Code Here


            if ("slicer".equals(attributeValue)) {
                return IncludeMode.SLICER;
            } else if ("planner".equals(attributeValue) || attributeValue == null) {
                return IncludeMode.PLANNER;
            }
            throw new TargetDefinitionSyntaxException("Invalid value for attribute 'includeMode': " + attributeValue
                    + "");
        }
View Full Code Here

    protected File getBuildDirectory() {
        return new File(getProject().getBuild().getDirectory());
    }

    protected BuildContext getBuildContext() {
        return new BuildContext(qualifier, getEnvironmentsForFacade(), getBuildDirectory());
    }
View Full Code Here

        }
        return facet;
    }

    protected BuildContext getBuildContext() {
        return new BuildContext(getQualifier(), getEnvironmentsForFacade(), getBuildDirectory());
    }
View Full Code Here

            }

            RepositoryReferences sources = getVisibleRepositories();

            MirrorApplicationService mirrorApp = p2.getService(MirrorApplicationService.class);
            DestinationRepositoryDescriptor destinationRepoDescriptor = new DestinationRepositoryDescriptor(
                    destination, repositoryName, compress, !createArtifactRepository, true);
            mirrorApp.mirrorReactor(sources, destinationRepoDescriptor, rootIUs, getBuildContext(),
                    includeAllDependencies, new MavenLoggerAdapter(logger, false));
        } catch (FacadeException e) {
            throw new MojoExecutionException("Could not assemble p2 repository", e);
View Full Code Here

     * @throws MojoFailureException
     *             in case required artifacts are missing
     */
    public RepositoryReferences getVisibleRepositories(MavenProject module, MavenSession session, int flags)
            throws MojoExecutionException, MojoFailureException {
        RepositoryReferences repositories = new RepositoryReferences();

        if ((flags & REPOSITORIES_INCLUDE_CURRENT_MODULE) != 0) {
            File publisherResults = new File(module.getBuild().getDirectory(), PUBLISHER_REPOSITORY_PATH);
            repositories.addMetadataRepository(publisherResults);
            repositories.addArtifactRepository(publisherResults);
        }

        addRepositoriesOfReferencedModules(repositories, module);

        // metadata and artifacts of target platform
        File targetPlatform = materializeTargetPlatformRepository(module);
        repositories.addMetadataRepository(targetPlatform);
        repositories.addArtifactRepository(new File(session.getLocalRepository().getBasedir()));
        return repositories;
    }
View Full Code Here

     * @throws MojoFailureException
     *             in case required artifacts are missing
     */
    public RepositoryReferences getVisibleRepositories(MavenProject module, MavenSession session, int flags)
            throws MojoExecutionException, MojoFailureException {
        RepositoryReferences repositories = new RepositoryReferences();

        if ((flags & REPOSITORIES_INCLUDE_CURRENT_MODULE) != 0) {
            File publisherResults = new File(module.getBuild().getDirectory(), PUBLISHER_REPOSITORY_PATH);
            repositories.addMetadataRepository(publisherResults);
            repositories.addArtifactRepository(publisherResults);
        }

        addRepositoriesOfReferencedModules(repositories, module);

        repositories.addArtifactRepository(RepositoryBlackboardKey.forResolutionContextArtifacts(module.getBasedir()));

        // metadata and artifacts of target platform
        File targetPlatform = materializeTargetPlatformRepository(module);
        repositories.addMetadataRepository(targetPlatform);
        repositories.addArtifactRepository(new File(session.getLocalRepository().getBasedir()));
        return repositories;
    }
View Full Code Here

    protected abstract Collection<?/* IInstallableUnit */> publishContent(PublisherService publisherService)
            throws MojoExecutionException, MojoFailureException;

    private PublisherService createPublisherService() throws MojoExecutionException, MojoFailureException {
        try {
            RepositoryReferences contextRepositories = repositoryReferenceTool.getVisibleRepositories(getProject(),
                    getSession(), 0);

            PublisherServiceFactory publisherServiceFactory = osgiServices.getService(PublisherServiceFactory.class);
            File publisherRepoLocation = new File(getBuildDirectory(),
                    RepositoryReferenceTool.PUBLISHER_REPOSITORY_PATH);
View Full Code Here

            Collection<?> rootIUs = (Collection<?>) getProject().getContextValue(TychoConstants.CTX_PUBLISHED_ROOT_IUS);
            if (rootIUs == null || rootIUs.size() == 0) {
                throw new MojoFailureException("No content specified for p2 repository");
            }

            RepositoryReferences sources = getVisibleRepositories();

            MirrorApplicationService mirrorApp = p2.getService(MirrorApplicationService.class);
            DestinationRepositoryDescriptor destinationRepoDescriptor = new DestinationRepositoryDescriptor(
                    destination, repositoryName, compress, !createArtifactRepository, true);
            mirrorApp.mirrorReactor(sources, destinationRepoDescriptor, rootIUs, getBuildContext(),
View Full Code Here

        List<org.eclipse.tycho.core.TargetEnvironment> original = TychoProjectUtils.getTargetPlatformConfiguration(
                project).getEnvironments();
        List<TargetEnvironment> converted = new ArrayList<TargetEnvironment>(original.size());
        for (org.eclipse.tycho.core.TargetEnvironment env : original) {
            converted.add(new TargetEnvironment(env.getWs(), env.getOs(), env.getArch()));
        }
        return converted;
    }
View Full Code Here

TOP

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

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.