Error in Maven assembly: mvn.bat not recognized

When I tried to create a Java project under NetBeans (with setting up external Maven), I received the following error:

"C: \ Users ...... \ bin \ mvn.bat" "is not recognized as an internal or external command, operating program or batch file

Edit : using Maven 3.3.3, Windows 10; Added custom maven for NetBeans to Tools> Options> Java> Maven> Execution> Maven Home> Browse

What can I do?

+8
java maven batch-file netbeans
source share
3 answers

To solve this problem:

  • Go to the Maven installation folder
  • Go to bin
  • Make sure you can see the file extensions.
  • Duplicate mvn.cmd and mvnDebug.cmd and rename these copies to have the extension .bat
  • Try to create a project now

a source

+21
source share

Install Netbeans 8.1 or later to fix 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.

+2
source share

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

0
source share

All Articles