Skip to content

Add checks for Maven dependencies #819

@smeyer198

Description

@smeyer198

The Maven Dependency Plugin allows us to check and organize the dependecies in the modules. Using the command mvn dependency:analyze the plugin reports some warnings if there are dependencies that are used, but not declared, and if there dependencies that are declared but not used. To clean up the pom files and do it "the Maven way", we can add an action that checks those dependencies by running the command above and failing when there is something wrong.

Tasks:

  • Create an action that runs mvn dependency:analyze (see style checks for reference) and fails when there are violations (see here)
  • Check current pom files for violations and clean them up (i.e. remove unused dependencies, update scopes and add missing used dependencies) s.t. the action succeeds
  • Make sure that everything works as before. It may happen that the analyzer discovers a dependency that is used only implicitly -> add it to an ignore list

Nice to have

If a dependency is used in multiple places, use a property in the parent pom file that defines the version. This way, we avoid having too many dependabot updates (see here)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions