0

I've been trying to solve this for quite a while now, but nothing seems to work.

I need to run "mvn clean deploy -P release" from the Terminal in IntelliJ (on Mac). But it keeps giving me the same error.

bash: mvn: command not found

I was able to run this command about 2 hours ago, but after closing and reopening IntelliJ, I am no longer able to run this command from the Terminal in IntelliJ.

Does anyone know why this happens and how I can fix this?

Jomy
  • 514
  • 6
  • 22
  • 1
    Make sure the directory with `mvn` script is added to `PATH` environment and this environment is visible to all the apps on the system per https://stackoverflow.com/a/26586170/104891. – CrazyCoder Jun 01 '21 at 22:24
  • Can you run it in the Mac terminal app? – Eugen Martynov Jun 02 '21 at 08:45
  • I can't run it in the terminal, but I have finally found the solution. For the command to work in InteliJ, you have to press CMD + ENTER instead of just ENTER. – Jomy Jun 02 '21 at 19:01

1 Answers1

0

I figured it out: you have to press CMD + ENTER in IntelliJ for the command to work.

Jomy
  • 514
  • 6
  • 22