Skip to content

Commit

Permalink
Print added repository-references when assembly a p2-repository
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Sep 29, 2023
1 parent 534d0a1 commit 2a90039
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@
import org.eclipse.tycho.TargetPlatform;
import org.eclipse.tycho.p2.tools.DestinationRepositoryDescriptor;
import org.eclipse.tycho.p2.tools.RepositoryReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TychoMirrorApplication extends org.eclipse.tycho.p2tools.copiedfromp2.MirrorApplication {

private static final Logger LOGGER = LoggerFactory.getLogger(TychoMirrorApplication.class);
private static final String SOURCE_SUFFIX = ".source";
private static final String FEATURE_GROUP = ".feature.group";
private final DestinationRepositoryDescriptor destination;
Expand Down Expand Up @@ -212,6 +215,16 @@ private static URI getNormalizedLocation(RepositoryReference r) {
return URI.create(location.endsWith("/") ? location.substring(0, location.length() - 1) : location);
}

@Override
protected void finalizeRepositories() {
Collection<IRepositoryReference> references = getDestinationMetadataRepository().getReferences();
if (!references.isEmpty()) {
LOGGER.info("Adding references to the following repositories:");
references.stream().map(r -> r.getLocation()).distinct().forEach(loc -> LOGGER.info(" {}", loc));
}
super.finalizeRepositories();
}

@Override
protected List<IArtifactKey> collectArtifactKeys(Collection<IInstallableUnit> ius, IProgressMonitor monitor)
throws ProvisionException {
Expand Down

0 comments on commit 2a90039

Please sign in to comment.