尝试运行Maven包装器时没有出现此类文件错误?

时间:2017-07-30 22:03:47

标签: java maven maven-plugin

我知道我安装了maven:

$ mvn --version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00)
Maven home: /home/roschler/.sdkman/candidates/maven/current
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-123-generic", arch: "amd64", family: "unix"

相信我根据工作目录的内容正确安装了maven包装器:

$ ls
LICENSE  mvnw  mvnw.cmd  pom.xml  README.md  src

然而,当我尝试运行maven包装器时,我收到以下错误:

$ ./mvnw

bash: ./mvnw: /bin/sh^M: bad interpreter: No such file or directory

为什么我会收到此错误以及如何解决?

0 个答案:

没有答案