Run with Maven Plugin

The plugin will recursively analyze all your Maven modules to detect negative examples of your best coding practices.


To add the plugin to your project, modify the pluginRepositories section of your root pom.xml:


Then update your plugins section:

            <!-- your others plugins-->

The plugin needs two settings:

  • promyze.apiKey: a user API key to fetch the practices

  • promyze.url: the full URL of the Packmind instance

mvn com.promyze:scanner:scan -promyze.apiKey=aNbe..av -promyze.url=

You can also use environment variables:

  • Packmind_URL

  • Packmind_API_KEY

in that case, you can run the following command:

mvn com.Packmind:scanner:scan 


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 codebase

    • onlyChanged: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: ${}/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: 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