Hey, i’m just getting started with OpenMRS and i’ve managed to install JDK 8, JRE 8, MySQL - community, IDEs like eclipse but failed with Apache maven 3.6.1.

When i try to run in the command prompt, it displays mvn is not recognised as an internal or external command.

Looking forward to your advise, Thanks.

You should actually make it a global variable in your computer. Try following this then after try accessing it via command line.

Right click on My Computer > Properties > Advanced system settings System Properties window will get displayed Under Advanced > Environment Variables

Click on New to set Environment Variables

Variable name: JAVA_HOME Variable value: C:\Program Files\Java\jdk1.8.0_121

Variable name: M2 Variable value: %M2_HOME%\bin

Variable name: M2_HOME Variable value: C:\Program Files\Apache Software Foundation\apache-maven-3.6.1

Variable name: Path Variable value: %M2_HOME%\bin

Then click on Ok, ok, ok. Now restart you command prompt and check again with “mvn –version” to verify the mvn is running, you may restart your system also.

@mmark was the above of help?

Yes, to some extent. Thanks

1 Like


Still under the same topic “apache maven 3.6.1”, why is it that in just afew days back, it was okay with command prompt and now not anymore.

The PATH seems to be okay but command prompt is displaying ‘mvn’ is not recognized as an internal or external command, operable program or batch file.

Need your help.

Are you sure added it to the environmental variables to make it global?

Try following this it will help you solve the problem.

@mmark was the issue sorted out?

1 Like

I just created a new Path %M2_HOME%\bin under the user variables and issue was sorted.