From 253a87ed493e3e98974f717334791e74cc09ab7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Wed, 19 Jun 2024 09:20:44 +0300 Subject: [PATCH] Migrate tycho-sourceref-jgit to JSR330 --- pom.xml | 17 ++++++++++++++++- tycho-extras/tycho-sourceref-jgit/pom.xml | 6 +++--- .../jgit/JGitSourceReferencesProvider.java | 7 +++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 56e2ba9078..da3ac83f3d 100644 --- a/pom.xml +++ b/pom.xml @@ -65,6 +65,7 @@ 3.13.1 6.10.0.202406032230-r 3.9.8 + 0.9.0.M2 3.9.0 3.3.0 @@ -136,7 +137,7 @@ org.eclipse.sisu org.eclipse.sisu.plexus - 0.9.0.M2 + ${sisu-version} provided @@ -510,6 +511,20 @@ maven-invoker-plugin 3.7.0 + + org.eclipse.sisu + sisu-maven-plugin + ${sisu-version} + + + index-project + + main-index + test-index + + + + diff --git a/tycho-extras/tycho-sourceref-jgit/pom.xml b/tycho-extras/tycho-sourceref-jgit/pom.xml index 9fb04fc475..9076d6671a 100644 --- a/tycho-extras/tycho-sourceref-jgit/pom.xml +++ b/tycho-extras/tycho-sourceref-jgit/pom.xml @@ -55,9 +55,9 @@ - org.codehaus.plexus - plexus-component-metadata - + org.eclipse.sisu + sisu-maven-plugin + diff --git a/tycho-extras/tycho-sourceref-jgit/src/main/java/org/eclipse/tycho/extras/sourceref/jgit/JGitSourceReferencesProvider.java b/tycho-extras/tycho-sourceref-jgit/src/main/java/org/eclipse/tycho/extras/sourceref/jgit/JGitSourceReferencesProvider.java index 86682ec43b..6ca397f088 100644 --- a/tycho-extras/tycho-sourceref-jgit/src/main/java/org/eclipse/tycho/extras/sourceref/jgit/JGitSourceReferencesProvider.java +++ b/tycho-extras/tycho-sourceref-jgit/src/main/java/org/eclipse/tycho/extras/sourceref/jgit/JGitSourceReferencesProvider.java @@ -16,9 +16,11 @@ import java.io.IOException; import java.net.URI; +import javax.inject.Named; +import javax.inject.Singleton; + import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.component.annotations.Component; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.errors.AmbiguousObjectException; @@ -30,7 +32,8 @@ import org.eclipse.tycho.packaging.sourceref.ScmUrl; import org.eclipse.tycho.packaging.sourceref.SourceReferencesProvider; -@Component(role = SourceReferencesProvider.class, hint = "git") +@Named("git") +@Singleton public class JGitSourceReferencesProvider implements SourceReferencesProvider { @Override