@Mojo(name="cds",
defaultPhase=GENERATE_SOURCES,
aggregator=true)
public class CdsMojo
extends AbstractCdsMojo
mvn cds:cds or mvn com.sap.cds:cds-maven-plugin:cds on the command line to execute all
configured CDS commands of the project in current directory.install-cdsdk of this plugin can be used for this.| 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.
|
buildContext, mojoExecution, PLUGIN_KEY, project, session, settings| Constructor and Description |
|---|
CdsMojo() |
| 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 File |
findCdsWorkingDir()
Finds the cds working directory by going upwards and looking for a .cdsrc.json file.
|
void |
setNpxExec(File npxExec)
Gets called to inject parameter "npxExec".
|
ensureCliExecuted, findGoalExecution, 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
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic void setNpxExec(File npxExec)
npxExec - a File pointing to the npx executable.protected 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.