Run with Maven Plugin
The plugin will recursively analyze all your Maven modules to detect negative examples of your best coding practices.
Installation
To add the plugin to your project, modify the pluginRepositories
section of your root pom.xml:
Then update your plugins
section:
The plugin needs two settings:
promyze.apiKey
: a user API key to fetch the practicespromyze.url
: the full URL of the Packmind instance
You can also use environment variables:
Packmind_URL
Packmind_API_KEY
in that case, you can run the following command:
Configuration
Here is the list of parameters you can use:
-Dpromyze.sources
: the top-level directories or files to analyze for each module. Default:src
.-Dpromyze.extensions
: a comma-separated list of extensions to include exclusively in the analysis. Ex:.java
. Default:.java,.kt,.scala,.groovy
-Dpromyze.formatters
: Comma-separated list of formatters: ["console", "sonarqube", "sarif"]. Default:console
.-Dpromyze.mode
: Execution mode:all:
scans all the codebaseonlyChanged:
Should only scan edited files on SCM (only Git is currently supported)
Default:
all
.-Dpromyze.exclude
: a comma-separated list of patterns that, if found in the file path, will discard the file from the analysis.-Dpromyze.severity
: Severity of the issues in the report, such as "WARNING", "MAJOR", "BLOCKER", .... Only relevant when one of the formatters is "sonarqube" or "sarif". Default:MAJOR
.-Dpromyze.issueType
: indicates the issue type to apply to issues. Only relevant when formatters include "sonarqube". Choose among: BUG, VULNERABILITY, CODE_SMELL. Default:BUG
.-Dpromyze.outputFile
: the output file for each module. Only relevant when one of the formatters is "sonarqube" or "sarif". Default:${project.build.directory}/promyze-scan.json
.-Dpromyze.errorIfResults
: If any issue is found during the analysis, the program will stop with an error code 1 (thus, it might stop the CI/CD process). Default:false
.-Dpromyze.url
: Indicate the full Packmind URL (ex: https://acme.promyze.app). You can pass it with PROMYZE_URL environment variable.-Dpromyze.apiKey
: Indicate the full Packmind API Key. We recommend to use instead the PROMYZE_API_KEY environment variable.
If you'd like to submit feedback or suggestions to improve this plugin, feel free to send your suggestions on the following link:
Last updated