Search in sources :

Example 6 with Category

use of org.eclipse.tycho.model.Category 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);
    }
}
Also used : DependencySeed(org.eclipse.tycho.core.resolver.shared.DependencySeed) FacadeException(org.eclipse.tycho.p2.tools.FacadeException) Category(org.eclipse.tycho.model.Category) MojoExecutionException(org.apache.maven.plugin.MojoExecutionException) PublisherService(org.eclipse.tycho.p2.tools.publisher.facade.PublisherService) ArrayList(java.util.ArrayList) File(java.io.File)

Aggregations

Category (org.eclipse.tycho.model.Category)6 File (java.io.File)3 PomFile (org.eclipse.tycho.versions.pom.PomFile)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)1 ArtifactDependencyVisitor (org.eclipse.tycho.core.ArtifactDependencyVisitor)1 DependencySeed (org.eclipse.tycho.core.resolver.shared.DependencySeed)1 FeatureRef (org.eclipse.tycho.model.FeatureRef)1 PluginRef (org.eclipse.tycho.model.PluginRef)1 ProductConfiguration (org.eclipse.tycho.model.ProductConfiguration)1 SiteFeatureRef (org.eclipse.tycho.model.UpdateSite.SiteFeatureRef)1 FacadeException (org.eclipse.tycho.p2.tools.FacadeException)1 PublisherService (org.eclipse.tycho.p2.tools.publisher.facade.PublisherService)1