Hi, im new to roo, and today is a third day when Im looking for an answer to my problem:
Im running this script in STS (its from http://www.springsource.org/spring-roo):
In perform tests phase Im getting maven exception:Code:hint jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity jpa --class ~.Timer --testAutomatically field string --fieldName message --notNull hint web mvc web mvc setup web mvc all --package ~.web selenium test --controller ~.web.TimerController web gwt setup web gwt all --proxyPackage ~.client.proxy --requestPackage ~.client.request perform tests perform package ! mvn ! ls
The same situation occours for perform packageCode:~.web roo> perform tests [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.559s [INFO] Finished at: Wed Feb 27 18:36:46 CET 2013 [INFO] Final Memory: 2M/15M [INFO] ------------------------------------------------------------------------ [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (c:\). Please verify you invoked Maven from the correct directory. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
I have no idea why maven is looking in (C:\) for pom.xml, while Im runing roo from the root directory of my project which is (C:\Dev\Projects Examples\Not Working Examples\RooStandalone).
I also tried perform package by opening command line window, navigating to the root directory of the project (C:\Dev\Projects Examples\Not Working Examples\RooStandalone) and running roo> perform package there. I got identical error as above.
Suprisingly when I runned in command line (not roo command console): mvn package, it all worked just fine!
I also tried to run this whole Roo Standalone Script directly with roo console, whithout making STS project. It also failed on perform tests phase.
So my question is, where/how to configure roo, so it will see maven? What am I doing wrong?
Shoud I put something to maven/conf/settings.xml file?
Is there an error in Environment Variables?
I'm using:
sts-3.1.0.RELEASE,
spring-roo-1.2.2.RELEASE,
apache-maven-3.0.4,
I'm running this on windows 7 86x
My environment Variables are:
Code:JAVA_HOME: C:\Program Files\Java\jdk1.7.0_09 M2_HOME: C:\Dev\Tools\springsource\apache-maven-3.0.4 M2: %M2_HOME%\bin ROO_HOME: C:\Dev\Tools\springsource\spring-roo-1.2.2.RELEASE HOME: %USERPROFILE% Path:(...)%JAVA_HOME%\bin;%ROO_HOME%\bin;%M2%;(...)
Also:
Im not sure if this is relevant but I also tried directly call mvn with roo command: ! mvn. This brought me anoter error:
When I run ! ls, or ! java, they work just fine.Code:Unable to execute command mvn [Cannot run program "mvn" (in directory "C:\Dev\Projects Examples\Not Working Examples\RooStandalone"): CreateProcess error=2, The system cannot find the file specified.]


Reply With Quote