use of org.eclipse.tycho.p2.tools.RepositoryReferences in project tycho by eclipse.
the class AssembleRepositoryMojo method execute.
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
try {
File destination = getAssemblyRepositoryLocation();
destination.mkdirs();
copyResources(destination);
Collection<DependencySeed> projectSeeds = TychoProjectUtils.getDependencySeeds(getProject());
if (projectSeeds.size() == 0) {
throw new MojoFailureException("No content specified for p2 repository");
}
RepositoryReferences sources = getVisibleRepositories();
TargetPlatformConfiguration configuration = TychoProjectUtils.getTargetPlatformConfiguration(getProject());
MirrorApplicationService mirrorApp = p2.getService(MirrorApplicationService.class);
DestinationRepositoryDescriptor destinationRepoDescriptor = new DestinationRepositoryDescriptor(destination, repositoryName, compress, xzCompress, keepNonXzIndexFiles, !createArtifactRepository, true);
mirrorApp.mirrorReactor(sources, destinationRepoDescriptor, projectSeeds, getBuildContext(), includeAllDependencies, configuration.isIncludePackedArtifacts(), profileProperties);
} catch (FacadeException e) {
throw new MojoExecutionException("Could not assemble p2 repository", e);
}
}
Aggregations