cds:npm

Full name:

com.sap.cds:cds-maven-plugin:2.9.0:npm

Description:

Execute an npm command on the CAP Java project. For example, it can be used to perform an npm install to install npm dependencies which are maintained in package.json.
Call mvn cds:npm -Darguments="..." or mvn com.sap.cds:cds-maven-plugin:npm -Darguments="..." to execute npm with given arguments.

Attributes:

  • Executes as an aggregator goal.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 1.7.0.
  • Binds by default to the lifecycle phase: initialize.

Optional Parameters

Name Type Since Description
<arguments> String - A line of space-separated arguments passed to npm for execution. For example: install -g.
User Property: arguments
<environmentVariables> Map<String,String> 1.26.0 Additional environment variables to set on the command line.
<npmRegistry> String - URL of NPM registry to use.
User Property: cds.npm.registry
<outputFile> File - Define an optional file to redirect standard and error output to. If not specified, the standard Maven logging is used.
User Property: outputFile
<skip> boolean - Skip execution of this goal.
Default: false
User Property: cds.npm.skip
<workingDirectory> File - The working directory to use during npm command execution. If not specified, the goal uses the directory containing a .cdsrc.json or package.json file. It goes up the project hierarchy on the file system until one of these files is found or the top-level project directory is reached.

Parameter Details

<arguments>

A line of space-separated arguments passed to npm for execution. For example: install -g.
  • Type: java.lang.String
  • Required: No
  • User Property: arguments

<environmentVariables>

Additional environment variables to set on the command line.
  • Type: java.util.Map<java.lang.String, java.lang.String>
  • Since: 1.26.0
  • Required: No

<npmRegistry>

URL of NPM registry to use.
  • Type: java.lang.String
  • Required: No
  • User Property: cds.npm.registry

<outputFile>

Define an optional file to redirect standard and error output to. If not specified, the standard Maven logging is used.
  • Type: java.io.File
  • Required: No
  • User Property: outputFile

Skip execution of this goal.
  • Type: boolean
  • Required: No
  • User Property: cds.npm.skip
  • Default: false

<workingDirectory>

The working directory to use during npm command execution. If not specified, the goal uses the directory containing a .cdsrc.json or package.json file. It goes up the project hierarchy on the file system until one of these files is found or the top-level project directory is reached.
  • Type: java.io.File
  • Required: No