Couldn't execute with maven version

I'm new to storm and maven i installed

Apache Maven 3.1.0 

and need to use it to maven a project

when i used mvn compile exec:java -Dexec.classPathScope=compile

I got

The program 'mvn' can be found in the following packages:
 * maven
 * maven2
Try: sudo apt-get install <selected package>


mvn -version
Apache Maven 3.1.0 


Your problem is that you are running /usr/bin/mvn (verify this by typing which mvn). This is where apt-get will install maven. However, you have installed maven somewhere under /opt, so simply running mvn isn't finding the maven you installed.

First ensure that your .bashrc is updated to include the correct path, and that the new path is before /usr/bin


Then you need to ensure that .bashrc is loaded. You can log out and in again, start a new console, or simply source it (. ~/.bashrc).

Need Your Help

Best way to define an immutable class in Objective C

objective-c immutability

I am a newbie in Objective C and I was wondering what is