7

I'm busy doing the Pizza Tutorial and when ever I get to the perform tests command I get the above error. I checked Windows Path and added all the necessary links to the STS file. I am at a loss. This is the fourth time I have tried this tutorial and get stuck at this command. Please help, it is frustrating me.

Dino
  • 561
  • 3
  • 10
  • 21

2 Answers2

17

In case someone stumbles upon this problem again, recent versions of maven for windows renamed the executable to mvn.cmd while Spring Roo expects mvn.bat to be there. Just copy mvn.cmd and rename the copy to mvn.bat and the perform commands should work.

M Rajoy
  • 4,028
  • 14
  • 54
  • 111
4

Check that you have Maven installed and that it's included in your PATH. (the "perform" commands in Roo Console are actually invoking Maven)

  • Do you mean I have to install Maven separately? I thought I came with STS as it is in the SpringSource folder? So now I'm confused? – Dino Mar 16 '13 at 07:46
  • I have restarted STS and now when I start Spring Roo I get the following error: **Lexical error at line 5, column 19. Encountered: "\\" (92), after : ""** I have clicked on the Java source where this error is and it has this in the code `package snippet; public class Snippet { public static void main(String[] args) { C:\Spring\apache-maven-3.0.4 } } ` I am learning Java at the same time and noticed that the folder location is not a valid java code? What is going on and why did it create something like that? – Dino Mar 16 '13 at 08:44
  • OK So I tried to update the path variables but still can't get it to work. I have followed the guide on maven's site and nothing. I updated the System Variables with *M2 %M2_HOME%\bin* and *M2_HOME C:\Spring\apache-maven-3.0.4* and added *%M2%* at the end of the Path variable and I still can't type MVN -Version in command line. I did this all in System Variables as opposed to User Variables. – Dino Mar 16 '13 at 09:33
  • OK It seems to work *mvn -version* when I just add the paths directy to Path variable. – Dino Mar 16 '13 at 09:49
  • Next problem, when I type perform tests I now get a JAVA_HOME variable not set. But it is set as I run *mvn -version* and it works on the command line. – Dino Mar 16 '13 at 10:03
  • 1
    OK So I got it to work. I had to restart STS and then it worked. :( – Dino Mar 16 '13 at 10:36