@Mojo(name="exec-all",
threadSafe=true,
defaultPhase=COMPILE)
public class NpmRunAllMojo
extends AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
private String[] |
args
The arguments to pass as npm commands.
|
private String |
command
An npm command to execute on each arg, such as 'install', 'test', etc.
|
private File |
npmHome
The directory that contains npm executable.
|
private File |
workingDir
The working directory.
|
| Constructor and Description |
|---|
NpmRunAllMojo() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.commons.exec.CommandLine |
addCommand(org.apache.commons.exec.CommandLine cmdLine) |
void |
execute() |
private void |
execute(org.apache.commons.exec.CommandLine cmdLine) |
private org.apache.commons.exec.CommandLine |
getNpmCommand() |
getCommand, isWindows, logLevel, parseArgument, useLogHandler@Parameter(property="npm.command") private String command
@Parameter(property="npm.args") private String[] args
@Parameter(property="npm.workingDir",
defaultValue="${basedir}")
private File workingDir
@Parameter(property="npm.home") private File npmHome
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate void execute(org.apache.commons.exec.CommandLine cmdLine)
throws org.apache.maven.plugin.MojoFailureException,
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionExceptionprivate org.apache.commons.exec.CommandLine addCommand(org.apache.commons.exec.CommandLine cmdLine)
private org.apache.commons.exec.CommandLine getNpmCommand()
Copyright © 2020. All rights reserved.