Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ & Maven - mvn command not found

Tags:

maven

I'm trying to build a drop wizard project created with IntelliJ. when I run

mvn package

I get

bash: mvn: command not found

I'm on a Mac and I'm following this tutorial: http://www.dropwizard.io/0.9.2/docs/getting-started.html

According to IntelliJ documentation (https://www.jetbrains.com/help/idea/2016.1/maven.html?origin=old_help)

Maven integration is shipped with IntelliJ IDEA, and you do not need to perform any additional actions to install it. You can start using it straight away for importing Maven projects, working with them and for running Maven goals.

So I don't know what I'm suppose to do in order to use the command line Any idea?

Thanks

like image 339
Davide Avatar asked Mar 19 '16 17:03

Davide


2 Answers

In IntelliJ, on the right hand side, click "Maven", and expand "Lifecycle" Select "Package" and click "Run" (green arrow).

enter image description here

like image 77
Davide Avatar answered Sep 25 '22 08:09

Davide


mvn is the command line tool for Maven. See https://maven.apache.org/install.html for details on how to install it. Or as you are using a Mac if you use brew try using it to install the maven formula.

like image 24
Matt Champion Avatar answered Sep 22 '22 08:09

Matt Champion