use of org.eclipse.tycho.p2.tools.publisher.facade.PublisherService in project tycho by eclipse.
the class PublisherServiceFactoryImpl method createPublisher.
@Override
public PublisherService createPublisher(ReactorProject project, List<TargetEnvironment> environments) {
P2TargetPlatform targetPlatform = (P2TargetPlatform) reactorRepoManager.getFinalTargetPlatform(project);
PublisherActionRunner publisherRunner = getPublisherRunnerForProject(targetPlatform, environments);
PublishingRepository publishingRepository = reactorRepoManager.getPublishingRepository(project.getIdentities());
return new PublisherServiceImpl(publisherRunner, project.getBuildQualifier(), publishingRepository);
}
use of org.eclipse.tycho.p2.tools.publisher.facade.PublisherService in project tycho by eclipse.
the class PublishCategoriesMojo method publishContent.
@Override
protected Collection<DependencySeed> publishContent(PublisherServiceFactory publisherServiceFactory) throws MojoExecutionException, MojoFailureException {
PublisherService publisherService = publisherServiceFactory.createPublisher(getReactorProject(), getEnvironments());
try {
List<DependencySeed> categoryIUs = new ArrayList<>();
for (Category category : getCategories()) {
final File buildCategoryFile = prepareBuildCategory(category, getBuildDirectory());
Collection<DependencySeed> ius = publisherService.publishCategories(buildCategoryFile);
categoryIUs.addAll(ius);
}
return categoryIUs;
} catch (FacadeException e) {
throw new MojoExecutionException("Exception while publishing categories: " + e.getMessage(), e);
}
}
use of org.eclipse.tycho.p2.tools.publisher.facade.PublisherService in project tycho by eclipse.
the class PublishEEProfileMojo method publishContent.
@Override
protected Collection<DependencySeed> publishContent(PublisherServiceFactory publisherServiceFactory) throws MojoExecutionException, MojoFailureException {
PublisherService publisherService = publisherServiceFactory.createPublisher(getReactorProject(), getEnvironments());
try {
Collection<DependencySeed> ius = publisherService.publishEEProfile(profileFile);
getLog().info("Published profile IUs: " + ius);
return ius;
} catch (FacadeException e) {
throw new MojoExecutionException("Exception while publishing execution environment profile " + profileFile + ": " + e.getMessage(), e);
}
}
Aggregations