diff --git a/src/site/markdown/Category.md b/src/site/markdown/Category.md index 307a849b4c..c8517dc96e 100644 --- a/src/site/markdown/Category.md +++ b/src/site/markdown/Category.md @@ -32,8 +32,10 @@ The following is an example, demonstrating a complex category definition. + + @@ -58,7 +60,11 @@ The following is an example, demonstrating a complex category definition. - id ~= /javax.*/ + + id ~= /javax.*/ + -``` \ No newline at end of file +``` + +You can read more about P2 Query Syntax [here](https://wiki.eclipse.org/Equinox/p2/Query_Language_for_p2). diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/publisher/PublisherActionRunner.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/publisher/PublisherActionRunner.java index ed5c02b328..197ae94481 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/publisher/PublisherActionRunner.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/publisher/PublisherActionRunner.java @@ -96,10 +96,9 @@ private void setTargetEnvironments(PublisherInfo publisherInfo) { private void handlePublisherStatus(IStatus result) { if (result.matches(IStatus.INFO)) { - logger.info(StatusTool.collectProblems(result)); + logger.info(StatusTool.toLogMessage(result)); } else if (result.matches(IStatus.WARNING)) { - logger.warn(StatusTool.collectProblems(result)); - + logger.warn(StatusTool.toLogMessage(result)); } else if (!result.isOK()) { Throwable directlyIncludedException = result.getException(); throw directlyIncludedException instanceof RuntimeException runtimeEx // diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java index 4709107cdb..76a629c9eb 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2tools/MirrorApplicationServiceImpl.java @@ -354,7 +354,7 @@ static class LogListener implements IArtifactMirrorLog { @Override public void log(IArtifactDescriptor descriptor, IStatus status) { if (!status.isOK()) { - logger.debug(MIRROR_TOOL_MESSAGE_PREFIX + StatusTool.collectProblems(status)); + logger.debug(MIRROR_TOOL_MESSAGE_PREFIX + StatusTool.toLogMessage(status)); hasLogged = true; } } @@ -362,7 +362,7 @@ public void log(IArtifactDescriptor descriptor, IStatus status) { @Override public void log(IStatus status) { if (!status.isOK()) { - logger.warn(MIRROR_TOOL_MESSAGE_PREFIX + StatusTool.collectProblems(status)); + logger.warn(MIRROR_TOOL_MESSAGE_PREFIX + StatusTool.toLogMessage(status)); hasLogged = true; } } 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 4fc4f02fad..1587aa1119 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 @@ -57,8 +57,10 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; import org.eclipse.tycho.TargetPlatform; +import org.eclipse.tycho.p2.repository.ListCompositeMetadataRepository; import org.eclipse.tycho.p2.tools.DestinationRepositoryDescriptor; import org.eclipse.tycho.p2.tools.RepositoryReference; +import org.eclipse.tycho.p2maven.ListCompositeArtifactRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,6 +96,26 @@ protected IArtifactRepository initializeDestination(RepositoryDescriptor toInit, return result; } + @Override + public IArtifactRepository getCompositeArtifactRepository() { + IArtifactRepository repository = super.getCompositeArtifactRepository(); + if (targetPlatform != null) { + return new ListCompositeArtifactRepository(List.of(repository, targetPlatform.getArtifactRepository()), + agent); + } + return repository; + } + + @Override + public IMetadataRepository getCompositeMetadataRepository() { + IMetadataRepository repository = super.getCompositeMetadataRepository(); + if (targetPlatform != null) { + return new ListCompositeMetadataRepository(List.of(repository, targetPlatform.getMetadataRepository()), + agent); + } + return repository; + } + @Override protected Slicer createSlicer(SlicingOptions options) { List> filters = getContextFilters();