From 0a32d95828ec8d358dd93a684266c8369a2339f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sun, 5 Jan 2025 17:22:11 +0100 Subject: [PATCH] Migrate ArtifactRepositoryComponent to DS annotations and property type --- .../.settings/org.eclipse.pde.ds.annotations.prefs | 7 +++++++ .../META-INF/MANIFEST.MF | 2 +- ....xml => org.eclipse.equinox.p2.artifact.repository.xml} | 4 ++-- .../artifact/repository/ArtifactRepositoryComponent.java | 6 +++++- 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.ds.annotations.prefs rename bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/{repositoryManager.xml => org.eclipse.equinox.p2.artifact.repository.xml} (61%) diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.ds.annotations.prefs b/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.ds.annotations.prefs new file mode 100644 index 0000000000..5faf08b7d5 --- /dev/null +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.ds.annotations.prefs @@ -0,0 +1,7 @@ +dsVersion=V1_4 +eclipse.preferences.version=1 +enabled=true +generateBundleActivationPolicyLazy=true +path=OSGI-INF +validationErrorLevel=error +validationErrorLevel.missingImplicitUnbindMethod=error diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF index 183253da81..621203aea6 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF @@ -69,7 +69,7 @@ Import-Package: javax.xml.parsers, org.osgi.service.prefs;version="1.1.1", org.w3c.dom, org.xml.sax;resolution:=optional -Service-Component: OSGI-INF/repositoryManager.xml +Service-Component: OSGI-INF/org.eclipse.equinox.p2.artifact.repository.xml Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: org.eclipse.equinox.p2.artifact.repository diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/org.eclipse.equinox.p2.artifact.repository.xml similarity index 61% rename from bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml rename to bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/org.eclipse.equinox.p2.artifact.repository.xml index 62a650ed3c..af7427c6d3 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/org.eclipse.equinox.p2.artifact.repository.xml @@ -1,8 +1,8 @@ - + - + \ No newline at end of file diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java index c6a8913678..df31624e4c 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java @@ -7,19 +7,23 @@ * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.equinox.internal.p2.artifact.repository; import org.eclipse.equinox.p2.core.IProvisioningAgent; +import org.eclipse.equinox.p2.core.spi.AgentServiceName; import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; +import org.osgi.service.component.annotations.Component; /** * Service factory providing {@link IArtifactRepositoryManager} instances. */ +@Component(service = IAgentServiceFactory.class, name = "org.eclipse.equinox.p2.artifact.repository") +@AgentServiceName(IArtifactRepositoryManager.class) public class ArtifactRepositoryComponent implements IAgentServiceFactory { @Override