I have a spring-boot application. It contains .mvn
folder. Should I add it to the `.gitignore file?
Or does it contain something that needs to be Git committed and version controlled?
CodePudding user response:
They are Maven Wrapper.
According to maven.apache.org/configure.html#mvn-folder , .mvn is located within the project’s top level directory, the files maven.config, jvm.config, and extensions.xml contain project specific configuration for running Maven. This folder is part of the project and may be checked in into your version control.
Maven to date has been very stable for users, is available on most systems or is easy to procure: but with many of the recent changes in Maven it will be easier for users to have a fully encapsulated build setup provided by the project. With the Maven Wrapper this is very easy to do and it's a great idea borrowed from Gradle.
So to answer your question , No it is not necessary to be committed. See the official maven.gitignore and java.gitignore from Github for reference.