Table of Contents |
---|
Overview
This page describes the parameters used in the Unified Agent's configuration.
...
Configuration File Parameter | Description and Expected Behavior | If True | If False | Default | Command Line Parameter Available? |
---|---|---|---|---|---|
resolveAllDependencies | Whether to enable or disable by default all dependency resolvers for a scan. For example, when the following parameters are set, only npm dependencies will be resolved in this case: | When set to True, the default for all package managers' resolveDependencies parameter is set to True, unless explicitly set to False. | When set to False, the default for all package managers' resolveDependencies the parameter is set to False, unless explicitly set to True. | True | -resolveAllDependencies |
excludeDependenciesFromNodes=.*commons-io.*,.*maven-model | Comma-delimited list of regular expressions. Specify an artifact id or multiple artifact ids (comma-delimited) to exclude the provided tree nodes and their sub-nodes from the scan. NOTE: These will not be added to your project inventory. | N/A | N/A | No default | No |
Java
...
...
Maven
...
maven.resolveDependencies=true
maven.aggregateModules=false
As a result, the Unified Agent will scan it and create a project per module in WhiteSource.
...
Configuration File Parameter | Description and Expected Behavior | If True | If False | Default | Command Line Parameter Available? |
---|---|---|---|---|---|
maven.ignoredScopes | Define which exact scope names to ignore. By default, the Unified Agent ignores direct dependencies with scope 'test' and 'provided'. | N/A | N/A | "provided" and "test" | -maven.ignoredScopes |
maven.resolveDependencies | Whether to resolve Maven dependencies, requires "pom.xml". | In case the project is a Maven project, the resolution will start. | The Maven resolution will not start resolution. | True | -maven.resolveDependencies |
maven.ignoreSourceFiles | When using the dependency resolver, it will only include pom.xml dependencies, not source files and packages. NOTE: Only relevant when fileSystemScan is true. | Will ignore files from scan, those which have extensions such as:".java", ".class","pom.xml". | Will not ignore the mentioned file extensions. | False | |
maven.aggregateModules | Combines all pom modules into a single WhiteSource project with an aggregated dependency flat list (no hierarchy). | Will create a single project for all modules, to be displayed as a flat list. | A project will be created for each module and displayed as a hierarchical tree. | False | -maven.aggregateModules |
maven.ignorePomModules | Whether to ignore dependency resolving of a pom.xml file containing a 'pom' value inside a packaging tag, i.e., '<packaging>pom</packaging>'. | The dependency resolver will ignore all dependencies specified inside a pom.xml file that contains a packaging tag with 'pom' value ('<packaging>pom</packaging>') | The dependency resolver will not ignore all dependencies specified inside a pom.xml file that contains a packaging tag with 'pom' value ('<packaging>pom</packaging>') | True | No |
maven.runPreStep | Whether to run "mvn clean install" command on found pom.xml folder | Will run the "mvn clean install" command | Will not run the "mvn clean install" command | False | No |
maven.ignoreMvnTreeErrors | If the command `mvn dependency:tree` fails, we try to resolve the partial output (of the command) if it exists and parse all the direct dependencies from the pom.xml file. | The scan will end with success and will send a flat list (direct only). | The scan will end with errors. | False | No |
maven.environmentPath | Path to the Maven installation in case it does not match the M2_HOME environment variable | N/A | N/A | No default | No |
maven.m2RepositoryPath | Path to .m2 folder, in case it is not available in the default location. | N/A | N/A | No default | No |
maven.downloadMissingDependencies | Allows users to disable downloading missing dependencies in Maven. | In case there is a missing dependency jar/binary in the repository, the code will try to download the missing dependency. | The downloading of missing dependencies will be disabled. | True | No |
maven.additionalArguments | Provides any parameters starting with '-' or '--', and Unified Agent should add these to the end of the Maven commands. Example values:
| N/A | N/A | No default | No |
failErrorLevel | Returns an error code for the following cases:
NOTE: When set to ALL, the Unified Agent returns an error code for all errors in the scan, rather than SUCCESS. This can be useful for customers migrating from the plugins (NPM, MAVEN etc.) to the Unified Agent. | N/A | N/A | DEFAULT | No |
maven.projectNameFromDependencyFile | Whether a project name will be taken from the dependency file. | The project name will be taken from the pom.xml's 'artifactId' field. Works only when the maven resolver is the only active resolver. If the Unified Agent identifies any additional resolvers besides Maven that are set to True, an error is generated. | The project name will be taken from the CLI/configuration file. | False | No |
...