Error in Maven build: mvn.bat not recognized

前端 未结 3 909
轮回少年
轮回少年 2021-02-05 11:24

While trying to build a Java project under NetBeans (with an external Maven configured), I got the following error:

\"C:\\Users......\\bin\\mvn.bat\"\" is

相关标签:
3条回答
  • 2021-02-05 11:55

    To solve it:

    1. Go to the Maven installation folder
    2. Go to bin
    3. Make sure you can see file extensions
    4. Duplicate mvn.cmd and mvnDebug.cmd and rename those copies to have the extension .bat
    5. Try building the project now

    source

    0 讨论(0)
  • 2021-02-05 11:56

    Maven 3.3+ has no more mvn.bat you should use version 2.5.2+ of the maven-release-plugin : https://issues.apache.org/jira/browse/MRELEASE-902

    0 讨论(0)
  • 2021-02-05 11:59

    Install Netbeans 8.1 or later to correct this issue.

    As @mkleint noted, this is a problem with Maven 3.3.3+ where maven changed the mvn executable extension.You can download the latest version on the Netbeans website.

    0 讨论(0)
提交回复
热议问题