public interface MavenActionsProvider
ServiceProvider
,
or since 2.50 may also be registered using ProjectServiceProvider
if applicable to just some packagings.
Since 2.149 the returned NetbeansActionMapping
can be disabled - checked by
ActionToGoalUtils.isDisabledMapping(org.netbeans.modules.maven.execute.model.NetbeansActionMapping)
. Such mapping will override the action that may be even enabled by a farther
MavenActionsProvider
. The ActionProvider
exported from the project will report such action as disabled.
Since 1.161, specific plugin goals can be declaratively marked as 'run' goals; if they are used in actions, NetBeans maven core
recognizes them and allows to configure vm, application arguments and main class name for the goal. It is a responsibility
of action mapping to remap the properties used by exec:exec to goal-specific properties, if it uses different naming. See the
following example:
<folder name="Projects">
<folder name="org-netbeans-modules-maven">
<!-- Register in Projects/org-netbeans-modules-maven/RunGoals area -->
<folder name="RunGoals">
<!-- Each file name corresponds to a fully qualified Plugin ID (group:artifact). Do not include versions -->
<file name="io.micronaut.maven:micronaut-maven-plugin">
<!-- Each plugin lists exec-like goals, separated by space -->
<attr name="goals" stringvalue="run"/>
</file>
<file name="io.micronaut.build:micronaut-maven-plugin">
<attr name="goals" stringvalue="run"/>
</file>
<!-- An alias can be specified, with mandatory attribute "alias" that points to the
real goal-declaration file
-->
<file name="mn">
<!-- Note the ./ at the beginning. As paths are resolved against URL, the ':' could act as a scheme, forming
an absolute URL. If the relative path starts with ./, it will be parsed as relative, not absolute URL
-->
<attr name="alias" stringvalue="./io.micronaut.maven:micronaut-maven-plugin"/>
</file>
</folder>
</folder>
</folder>
Modifier and Type | Method and Description |
---|---|
RunConfig |
createConfigForDefaultAction(String actionName,
Project project,
Lookup lookup)
Create an instance of RunConfig configured for execution.
|
NetbeansActionMapping |
getMappingForAction(String actionName,
Project project)
get a action to maven mapping configuration for the given action.
|
Set<String> |
getSupportedDefaultActions()
returns a list of supported actions, see ActionProvider.getSupportedActions()
|
boolean |
isActionEnable(String action,
Project project,
Lookup lookup)
return is action is supported or not
|
RunConfig createConfigForDefaultAction(String actionName, Project project, Lookup lookup)
actionName
- one of the ActionProvider constantsNetbeansActionMapping getMappingForAction(String actionName, Project project)
boolean isActionEnable(String action, Project project, Lookup lookup)
action
- action name, see ActionProvider for details.project
- project that the action is invoked on.lookup
- context for the action