I have Backend codes and APIs in a folder I download it from mail. I am using Mac OS.
But when I run ./mvnw
in terminal I got the error
-bash: ./mvnw: /bin/sh^M: bad interpreter: No such file or directory
How to overcome this error?
I have Backend codes and APIs in a folder I download it from mail. I am using Mac OS.
But when I run ./mvnw
in terminal I got the error
-bash: ./mvnw: /bin/sh^M: bad interpreter: No such file or directory
How to overcome this error?
I had the same error as you, installing mvn wrapper in the following way worked for me.
mvn -N io.takari:maven:wrapper
Then cd to the folder where pom.xml file is, and then re-run the ./mvnw command
I tried dos2unix filename
it works. For using this command we have to install dos2unix
This is the link for install
The error suggests that the mvnw file is not there. Go to your maven project which you need to build and then run mvnw like bellow by pointing to the path of mvnw.
sh /home/user/maven-wrapper-master/mvnw clean install
Or else copy the mvnw file into the maven project directory.
I had the same error, so in this situation ./mvnw doesn`t work, but I tried to write the absolute path to the mvnw file and it works! So try it!