I used the Spring Initializr website https://start.spring.io/ to create a spring boot program, and I wanted to delete the mvnw
, mvnw.cmd
, and .mvnw
directory.
Is there any reason to keep these files maven wrapper files around?
I read What is the purpose of mvnw and mvnw.cmd files? and see that if I didn't have maven installed it would download maven and use that downloaded code to compile my java code.
If I delete them does that cause problems for someone else on the team?
I've always deleted them and it's never caused a problem that I'm aware of, but maybe it's because the team members all have maven installed
It seems like mvnw
similar to the npx
command in Javascript but only for the one mvn command.
Having Java and Maven installed seems (to me) to be a prerequisite to writing Java code, so I'm baffled as to what problem the Spring Team was solving when then decided to add this feature. If anyone knows the use case or reason that this was done, please share it.
Every couple of years I revisit this question and figured I'd ask it and have the answer in SO for future reference.