@Mojo(name="install-cdsdk",
defaultPhase=INITIALIZE,
aggregator=true)
public class InstallCdsdkMojo
extends AbstractCdsMojo
-Dcds.install-cdsdk.force=true to the Maven
command line to force the installation of a @sap/cds-dk in the configured version.| Modifier and Type | Field and Description |
|---|---|
protected static String |
PARAM_NODE_DIR |
protected static String |
PARAM_NPM_EXECUTABLE |
protected static String |
PARAM_NPX_EXECUTABLE |
protected static String |
PROP_NODE_DIR |
protected static String |
PROP_NODE_EXECUTABLE |
protected static String |
PROP_NPM_EXECUTABLE |
protected static String |
PROP_NPX_EXECUTABLE |
protected org.eclipse.aether.RepositorySystemSession |
repositorySystemSession
Defines settings and components that control the repository system.
|
protected boolean |
skip
Skip execution of this goal.
|
buildContext, mojoExecution, project, session, settings| Constructor and Description |
|---|
InstallCdsdkMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected void |
execute(File workDir,
File execFile,
OutputStream outputStream,
Map<String,String> environment,
int[] exitValues,
String... args)
Executes a child process.
|
protected void |
executeNpm(File workDir,
File outputFile,
String... args) |
protected String |
executeNpm(File workDir,
int[] exitValues,
String... args) |
protected String |
executeNpm(File workDir,
String... args) |
protected File |
findCdsWorkingDir()
Finds the cds working directory by going upwards and looking for a .cdsrc.json file.
|
protected Map<String,String> |
getEnvironment() |
getTopmostProjectDir, isCliExecuted, logDebug, logDebug, logError, logError, logError, logInfo, logWarn, logWarn, logWarn, scanDirectory, setPropertyprotected static final String PROP_NODE_DIR
protected static final String PROP_NODE_EXECUTABLE
protected static final String PROP_NPM_EXECUTABLE
protected static final String PROP_NPX_EXECUTABLE
protected static final String PARAM_NODE_DIR
protected static final String PARAM_NPX_EXECUTABLE
protected static final String PARAM_NPM_EXECUTABLE
@Parameter(defaultValue="${repositorySystemSession}",
required=true,
readonly=true)
protected org.eclipse.aether.RepositorySystemSession repositorySystemSession
@Parameter(defaultValue="false") protected boolean skip
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void executeNpm(File workDir, File outputFile, String... args) throws org.apache.commons.exec.ExecuteException, IOException
org.apache.commons.exec.ExecuteExceptionIOExceptionprotected String executeNpm(File workDir, int[] exitValues, String... args) throws org.apache.commons.exec.ExecuteException, IOException
org.apache.commons.exec.ExecuteExceptionIOExceptionprotected String executeNpm(File workDir, String... args) throws org.apache.commons.exec.ExecuteException, IOException
org.apache.commons.exec.ExecuteExceptionIOExceptionprotected void execute(File workDir, File execFile, OutputStream outputStream, Map<String,String> environment, int[] exitValues, String... args) throws IOException, org.apache.commons.exec.ExecuteException
workDir - the working directory of child processexecFile - the executable to useoutputStream - an optional standard output streamenvironment - an optional process environment, can be nullexitValues - an optional list with exit values of the process to be considered successful, can be
nullargs - an optional command line arguments passed to the processIOException - if an I/O exception occurredorg.apache.commons.exec.ExecuteException - if process execution failedprotected File findCdsWorkingDir()
null if not found.Copyright © 2021. All rights reserved.