From 458c6aec733b4d93bb9e9656add8b1b882696b2b Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Sat, 2 Sep 2023 00:16:45 +0200 Subject: [PATCH] Print added repository-references when assembly a p2-repository --- .../tycho/p2tools/TychoMirrorApplication.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2tools/TychoMirrorApplication.java b/tycho-core/src/main/java/org/eclipse/tycho/p2tools/TychoMirrorApplication.java index 9f0a40df15..dd0780f352 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2tools/TychoMirrorApplication.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2tools/TychoMirrorApplication.java @@ -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; @@ -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 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 collectArtifactKeys(Collection ius, IProgressMonitor monitor) throws ProvisionException {