public final class RunUtils extends Object
Modifier and Type | Method and Description |
---|---|
static RunConfig |
cloneRunConfig(RunConfig original)
return a new instance of runconfig by the template passed as parameter
|
static RunConfig |
createRunConfig(File execDir,
Project prj,
String displayName,
List<String> goals) |
static RunConfig |
createRunConfig(String action,
Project prj,
ProjectConfiguration c,
Lookup lookup)
Creates a
RunConfig for the specified project action. |
static ExecutorTask |
executeMaven(RunConfig config)
Execute maven build in NetBeans execution engine.
|
static boolean |
hasApplicationCompileOnSaveEnabled(Project prj)
Deprecated.
|
static boolean |
hasApplicationCompileOnSaveEnabled(RunConfig config)
Deprecated.
|
static boolean |
hasTestCompileOnSaveEnabled(Project prj)
Deprecated.
|
static boolean |
hasTestCompileOnSaveEnabled(RunConfig config)
Deprecated.
|
static boolean |
isCompileOnSaveEnabled(Project prj) |
static boolean |
isCompileOnSaveEnabled(RunConfig config) |
static ExecutorTask |
run(RunConfig config)
Runs Maven after checking prerequisites.
|
@CheckForNull public static ExecutorTask run(RunConfig config)
config
- a run configuration (try RunUtils.createRunConfig(java.lang.String, org.netbeans.api.project.Project, org.netbeans.spi.project.ProjectConfiguration, org.openide.util.Lookup)
)RunUtils.executeMaven(org.netbeans.modules.maven.api.execute.RunConfig)
,
PrerequisitesChecker
public static ExecutorTask executeMaven(RunConfig config)
RunUtils.run(org.netbeans.modules.maven.api.execute.RunConfig)
as this variant does no (non-late-bound) prerequisite checks.
It is mostly suitable for cases where you need full control by the caller over the config, or want to rerun a previous execution.config
- public static RunConfig createRunConfig(String action, Project prj, ProjectConfiguration c, Lookup lookup)
RunConfig
for the specified project action. Project configuration to be used can be also specified, which
affects potentially the action's mapping and/or properties. If null
is passed, the current/active configuration is used.
If applied on non-Maven project, the method returns null
, as well as if the requested action does not exist in the project
or its requested (or active) configuration.action
- project action nameprj
- the projectc
- the configuration to use, use null
for the active one.lookup
- lookup that becomes available to the action provider for possible further data / optionsRunConfig
suitable for execution or null
if the project is not maven, or action is unavailable.public static RunConfig createRunConfig(File execDir, Project prj, String displayName, List<String> goals)
public static RunConfig cloneRunConfig(RunConfig original)
original
- public static boolean isCompileOnSaveEnabled(Project prj)
public static boolean isCompileOnSaveEnabled(RunConfig config)
@Deprecated public static boolean hasApplicationCompileOnSaveEnabled(Project prj)
prj
- @Deprecated public static boolean hasApplicationCompileOnSaveEnabled(RunConfig config)
config
- @Deprecated public static boolean hasTestCompileOnSaveEnabled(Project prj)
prj
- @Deprecated public static boolean hasTestCompileOnSaveEnabled(RunConfig config)
config
-