apadana
apadana

Reputation: 14660

Usage of mvnvm vs mvn?

I saw a friend using mvnvm for compiling their projects. What is the advantage of mvnvm over mvn, and what functionality does it provide? I could find the website mvnvm.org, but I couldn't find much information beyond that.

Upvotes: 8

Views: 7141

Answers (1)

Matthew Jensen
Matthew Jensen

Reputation: 256

I'm the author of mvnvm, its a script that will download and run the specified (or default) version of maven for your project.

The main benefits are:

  • You can control the version of maven used for your project centrally in one place (store it with the project)
  • You don't need every possible maven version installed on your build agents as mvnvm can be installed and manage whats needed
  • If you contribute to a project only occasionally, then you don't need to worry about switching as the source of that project defines the maven version and you can be sure your building it correctly
  • The version of maven used to build your release artifact is forever defined in the source, this makes reproducible builds more likely in the future.

Good luck!

Upvotes: 24

Related Questions