From a25413f9fca44ff04c6ac7ce9e0c1cd2e90c8b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sat, 6 Jan 2024 13:59:46 +0100 Subject: [PATCH] Move components to JSR330 --- pom.xml | 14 ++++++++++++++ tycho-core/pom.xml | 4 ++++ .../core/osgitools/BuildPropertiesParserImpl.java | 11 +++++++---- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 35a9ecdc35..c35af601bc 100644 --- a/pom.xml +++ b/pom.xml @@ -488,6 +488,20 @@ maven-invoker-plugin 3.6.0 + + org.eclipse.sisu + sisu-maven-plugin + 0.9.0.M2 + + + index-project + + main-index + test-index + + + + diff --git a/tycho-core/pom.xml b/tycho-core/pom.xml index f0d602fac6..d252baf1e3 100644 --- a/tycho-core/pom.xml +++ b/tycho-core/pom.xml @@ -157,6 +157,10 @@ + + org.eclipse.sisu + sisu-maven-plugin + diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/BuildPropertiesParserImpl.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/BuildPropertiesParserImpl.java index d28cdc5be0..8df9a5b8ed 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/BuildPropertiesParserImpl.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/BuildPropertiesParserImpl.java @@ -25,11 +25,13 @@ import java.util.function.Supplier; import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.LegacySupport; import org.apache.maven.project.MavenProject; -import org.codehaus.plexus.component.annotations.Component; -import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable; import org.eclipse.tycho.BuildProperties; import org.eclipse.tycho.BuildPropertiesParser; @@ -38,12 +40,13 @@ import org.eclipse.tycho.core.BuildPropertiesImpl; import org.eclipse.tycho.core.maven.TychoInterpolator; -@Component(role = BuildPropertiesParser.class) +@Named +@Singleton public class BuildPropertiesParserImpl implements BuildPropertiesParser, Disposable { private final Map cache = new HashMap<>(); - @Requirement + @Inject LegacySupport legacySupport; @Override