Search in sources :

Example 1 with ReactorRepositoryManagerFacade

use of org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade in project tycho by eclipse.

the class TargetPlatformMojo method execute.

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    ReactorRepositoryManagerFacade repositoryManager = osgiServices.getService(ReactorRepositoryManagerFacade.class);
    List<ReactorProjectIdentities> upstreamProjects = getReferencedTychoProjects();
    repositoryManager.computeFinalTargetPlatform(DefaultReactorProject.adapt(project), upstreamProjects);
}
Also used : ReactorRepositoryManagerFacade(org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade) ReactorProjectIdentities(org.eclipse.tycho.ReactorProjectIdentities)

Example 2 with ReactorRepositoryManagerFacade

use of org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade in project tycho by eclipse.

the class AttachPublishedArtifactsMojo method execute.

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    ReactorRepositoryManagerFacade reactorRepoManager = osgiServices.getService(ReactorRepositoryManagerFacade.class);
    PublishingRepositoryFacade publishingRepo = reactorRepoManager.getPublishingRepository(getProjectIdentities());
    Map<String, File> artifacts = publishingRepo.getArtifactLocations();
    for (Entry<String, File> entry : artifacts.entrySet()) {
        String classifier = entry.getKey();
        File artifactLocation = entry.getValue();
        if (classifier == null) {
            getProject().getArtifact().setFile(artifactLocation);
        } else {
            String type = getExtension(artifactLocation);
            projectHelper.attachArtifact(getProject(), type, classifier, artifactLocation);
        }
    }
    ReactorProject reactorProject = getReactorProject();
    reactorProject.setDependencyMetadata(true, publishingRepo.getInstallableUnits());
    reactorProject.setDependencyMetadata(false, Collections.emptySet());
}
Also used : ReactorRepositoryManagerFacade(org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade) ReactorProject(org.eclipse.tycho.ReactorProject) PublishingRepositoryFacade(org.eclipse.tycho.repository.registry.facade.PublishingRepositoryFacade) File(java.io.File)

Aggregations

ReactorRepositoryManagerFacade (org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade)2 File (java.io.File)1 ReactorProject (org.eclipse.tycho.ReactorProject)1 ReactorProjectIdentities (org.eclipse.tycho.ReactorProjectIdentities)1 PublishingRepositoryFacade (org.eclipse.tycho.repository.registry.facade.PublishingRepositoryFacade)1