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 dd0780f352..e31a9f60a8 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 @@ -217,10 +217,13 @@ private static URI getNormalizedLocation(RepositoryReference r) { @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)); + IMetadataRepository repository = getDestinationMetadataRepository(); + if (repository != null) { + Collection references = repository.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(); }