Allow Dependency Scanning to analyze maven projects without the install step

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

When analyzing maven projects, the gemnasium-maven analyzer will first do a mvn install on the project. This is done in order to ensure that multi-module projects (which rely on other unbuilt modules in the same project) to be scanned without error.

Not all projects need this functionality. Single-module projects do not need this step. Nor do multi-module projects that don't need a scan-time build of a submodule. The mandatory install step increases analysis run-time and blows up the container resources required by the analyzer.

Proposal

Add an environment variable DS_MVN_SKIP_INSTALL to be used by the gemnasium-maven analyzer. Adding this variable will allow the analyzer to conditionally execute the mvn install step. This will allow users to disable installs when their projects don't require them, reducing build times and container resources required.

Implementation plan

What does success look like, and how can we measure that?

Users will be able to skip the install step when scanning the dependencies of their maven projects.

Edited by 🤖 GitLab Bot 🤖