Class PluginRealmHelper
- java.lang.Object
-
- org.eclipse.tycho.core.maven.utils.PluginRealmHelper
-
@Component(role=PluginRealmHelper.class) public class PluginRealmHelper extends Object
Helper class that allows execution of components from maven plugin class realms. Normally, these components are not visible from tycho-core extensions plugin and require treatment. Typical usage@Requirement private EquinoxServiceFactory equinox; @Requirement private PluginRealmHelper pluginRealmHelper; ... public void someMethod(final MavenSession session, final MavenProject project) throws MavenExecutionException { pluginRealmHelper..execute(session, project, new Runnable() { public void run() { try { equinox.lookup(SomeComponent.class).someComponentMethod(); } catch (ComponentLookupException e) { // have not found anything } } }, new PluginFilter() { public boolean accept(PluginDescriptor descriptor) { return true if the plugin is relevant; } }); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PluginRealmHelper.PluginFilter
-
Constructor Summary
Constructors Constructor Description PluginRealmHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, Runnable runnable, PluginRealmHelper.PluginFilter filter)
-
-
-
Method Detail
-
execute
public void execute(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, Runnable runnable, PluginRealmHelper.PluginFilter filter) throws org.apache.maven.MavenExecutionException
- Throws:
org.apache.maven.MavenExecutionException
-
-