Reputation:
I have seen on internet to run command like
mvn . . . . . something
but I am confused where to write this.
if in command prompt cmd.exe
I tried mvn.exe it says command not found
because maven is in STS
Upvotes: 12
Views: 18830
Reputation: 21
If you want to run mvn from the cmd.exe you must:
1) Download maven (https://maven.apache.org/download.cgi)
2) Add it to your Path and configure JAVA_HOME (see: https://maven.apache.org/install.html)
3) Navigate to the root directory of your project (in cmd.exe)
4) Run mvn (and any of the options like clean or install etc)
5) Then you can run "mvn . . . . . something"
Upvotes: 2
Reputation: 55866
Hope you have m2eclipse installed.
Right click on project directory in Eclipse > Run As > Run Configurations... > Double click Maven Build > fill in name, select base directory of the project, provide goal (e.g. clean install), provide profile that you want to build (leave blank for default, else profile names space separated) > check options if any like (offline for -o etc) > click run
this will be available in your menu bar for future usage.
Upvotes: 14