Skip to content
4 changes: 4 additions & 0 deletions tycho-apitools-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
import org.apache.maven.SessionScoped;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import javax.inject.Named;
import javax.inject.Singleton;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.tycho.classpath.ClasspathContributor;
import org.eclipse.tycho.core.TychoProjectManager;
import org.eclipse.tycho.core.osgitools.AbstractSpecificationClasspathContributor;
import org.eclipse.tycho.model.project.EclipseProject;
import org.osgi.framework.VersionRange;

@Component(role = ClasspathContributor.class, hint = "apitools-annotations")
@Named("apitools-annotations")
@Singleton
@SessionScoped
public class ApiAnnotationsClasspathContributor extends AbstractSpecificationClasspathContributor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
import java.util.Collection;
import java.util.Set;

import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.inject.Inject;
import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.ArtifactKey;
import org.eclipse.tycho.IllegalArtifactReferenceException;
Expand All @@ -34,16 +35,17 @@
* Component that resolves the bundles that make up the ApiApplication from a
* given URI
*/
@Component(role = ApiApplicationResolver.class)
@Named
@Singleton
public class ApiApplicationResolver {

@Requirement
@Inject
private Logger logger;

@Requirement
@Inject
private EclipseApplicationFactory applicationFactory;

@Requirement
@Inject
private EclipseApplicationManager applicationManager;

public Collection<Path> getApiBaselineBundles(Collection<MavenRepositoryLocation> baselineRepoLocations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
import org.apache.commons.io.FilenameUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.inject.Inject;
import org.codehaus.plexus.logging.Logger;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.VersionRange;
Expand Down Expand Up @@ -75,7 +76,8 @@
import de.vandermeer.asciitable.AsciiTable;
import de.vandermeer.skb.interfaces.transformers.textformat.TextAlignment;

@Component(role = ArtifactBaselineComparator.class, hint = ArtifactType.TYPE_ECLIPSE_PLUGIN)
@Named(ArtifactType.TYPE_ECLIPSE_PLUGIN)
@Singleton
public class BundleArtifactBaselineComparator implements ArtifactBaselineComparator {

private static final String X_INTERNAL_ATTRIBUTE = "x-internal";
Expand All @@ -86,10 +88,10 @@ public class BundleArtifactBaselineComparator implements ArtifactBaselineCompara

private static final int WIDTH = 160;

@Requirement
@Inject
private P2RepositoryManager repositoryManager;

@Requirement(role = ContentsComparator.class)
@Inject
Map<String, ContentsComparator> contentComparators;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.inject.Inject;
import org.codehaus.plexus.logging.Logger;
import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
Expand Down Expand Up @@ -78,7 +79,8 @@
* will be considered a micro change</li>
* <ul>
*/
@Component(role = ArtifactBaselineComparator.class, hint = ArtifactType.TYPE_ECLIPSE_FEATURE)
@Named(ArtifactType.TYPE_ECLIPSE_FEATURE)
@Singleton
public class FeatureBaselineComparator implements ArtifactBaselineComparator {

private static final int WIDTH = 160;
Expand All @@ -87,16 +89,17 @@ public class FeatureBaselineComparator implements ArtifactBaselineComparator {
private static final String JAR_SUFFIX = ".feature.jar";
private static final String SOURCE_SUFFIX = ".source";

@Requirement(hint = "zip")
@Inject
@Named("zip")
ContentsComparator zipComparator;

@Requirement
@Inject
MetadataIO metadataIO;

@Requirement
@Inject
P2Generator p2generator;

@Requirement
@Inject
P2RepositoryManager repositoryManager;

@Override
Expand Down
4 changes: 4 additions & 0 deletions tycho-bnd-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@
import java.util.Map;
import java.util.SortedSet;

import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;

import aQute.bnd.osgi.repository.ResourcesRepository;
import aQute.bnd.osgi.resource.ResourceBuilder;
import aQute.bnd.service.RepositoryPlugin;
import aQute.bnd.service.resource.SupportingResource;
import aQute.bnd.version.Version;

@Component(role = MavenReactorRepository.class)
@Named
@Singleton
public class MavenReactorRepository extends ResourcesRepository implements RepositoryPlugin {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
import org.apache.maven.model.PluginExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.inject.Inject;
import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
import org.codehaus.plexus.logging.Logger;
Expand Down Expand Up @@ -63,7 +64,8 @@
* <code>test<code> maven dependency</li>
* </ul>
*/
@Component(role = AbstractMavenLifecycleParticipant.class)
@Named
@Singleton
public class BndMavenLifecycleParticipant extends AbstractMavenLifecycleParticipant {

private static final Set<Entry<String, String>> BND_TO_MAVEN_MAPPING = Map.of(//
Expand All @@ -73,10 +75,10 @@ public class BndMavenLifecycleParticipant extends AbstractMavenLifecycleParticip
Constants.TESTPATH, Artifact.SCOPE_TEST //
).entrySet();

@Requirement
@Inject
private Logger logger;

@Requirement
@Inject
private BndPluginManager bndPluginManager;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
import org.apache.maven.execution.ProjectExecutionListener;
import org.apache.maven.lifecycle.LifecycleExecutionException;
import org.apache.maven.plugin.MojoExecution;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.inject.Inject;
import org.eclipse.tycho.bnd.MavenReactorRepository;

@Component(role = ProjectExecutionListener.class)
@Named
@Singleton
public class BndProjectExecutionListener implements ProjectExecutionListener {


@Requirement
@Inject
private MavenReactorRepository mavenReactorRepository;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
import java.util.List;
import java.util.stream.Collectors;

import javax.inject.Inject;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.eclipse.tycho.bnd.MavenReactorRepository;
Expand All @@ -34,7 +35,7 @@ public abstract class AbstractBndMojo extends AbstractMojo {
@Parameter(property = "session", readonly = true)
protected MavenSession session;

@Component
@Inject
protected MavenReactorRepository mavenReactorRepository;

protected Workspace getWorkspace() throws MojoFailureException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@

import java.util.Date;

import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;

/**
* Build timestamp provider that returns the same timestamp for all projects, the
* ${maven.build.timestamp}.
*/
@Component(role = BuildTimestampProvider.class, hint = DefaultBuildTimestampProvider.ROLE_HINT)
@Named(DefaultBuildTimestampProvider.ROLE_HINT)
@Singleton
public class DefaultBuildTimestampProvider implements BuildTimestampProvider {

static final String ROLE_HINT = "default";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
import java.util.Properties;

import org.apache.maven.lifecycle.Lifecycle;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.model.Build;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.eclipse.tycho.TychoConstants;
import org.eclipse.tycho.bndlib.JdtProjectBuilder;
import org.eclipse.tycho.pomless.AbstractTychoMapping;
Expand All @@ -39,11 +41,12 @@
import aQute.bnd.build.ProjectBuilder;
import aQute.bnd.build.Workspace;

@Component(role = Mapping.class, hint = "bnd")
@Named("bnd")
@Singleton
public class BndProjectMapping extends AbstractTychoMapping {

private static final String TYCHO_BND_PLUGIN = "tycho-bnd-plugin";
@Requirement(role = Lifecycle.class)
@Inject
private Map<String, Lifecycle> lifecycles;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;

import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.model.Model;
import org.codehaus.plexus.component.annotations.Component;
import org.eclipse.tycho.TychoConstants;
import org.eclipse.tycho.pomless.AbstractTychoMapping;
import org.eclipse.tycho.pomless.NoParentPomFound;
Expand All @@ -33,7 +35,8 @@
import aQute.bnd.build.Project;
import aQute.bnd.build.Workspace;

@Component(role = Mapping.class, hint = "bnd-workspace")
@Named("bnd-workspace")
@Singleton
public class BndWorkspaceMapping extends AbstractTychoMapping {

private Map<String, List<String>> modulesCache = new ConcurrentHashMap<String, List<String>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
package org.eclipse.tycho.core.osgitools;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.SessionScoped;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.eclipse.tycho.classpath.ClasspathContributor;
import org.osgi.framework.VersionRange;

@Component(role = ClasspathContributor.class, hint = "metatype-annotations")
@Named("metatype-annotations")
@Singleton
@SessionScoped
public class MetatypeAnnotationsClasspathContributor extends AbstractSpecificationClasspathContributor {

Expand Down
4 changes: 4 additions & 0 deletions tycho-eclipse-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@

import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import javax.inject.Named;
import javax.inject.Singleton;
import javax.inject.Inject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.MetadataFactory;
Expand All @@ -29,10 +30,11 @@
import org.eclipse.tycho.p2maven.tmp.BundlesAction;
import org.eclipse.tycho.resolver.InstallableUnitProvider;

@Component(role = InstallableUnitProvider.class, hint = "eclipse-build")
@Named("eclipse-build")
@Singleton
public class EclipseBuildInstallableUnitProvider implements InstallableUnitProvider {

@Requirement
@Inject
PluginConfigurationHelper configurationHelper;

@Override
Expand Down
4 changes: 4 additions & 0 deletions tycho-p2-publisher-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Expand Down
Loading