View Full Version : Maven tests failure after clean
Oct 3rd, 2009, 10:17 AM
I create some mock tests for my entities.
If I run mvn clean test, it failed because
Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)
Now, if I build my project in STS and after that I run mvn test, all is good.
I try to run manually test-compile before test, but it failed, too.
Do you know what I can do to compile correctly my tests, without using STS?
Oct 4th, 2009, 01:34 AM
That's rather surprising.
Did Roo create the project from scratch, including the pom.xml? In that case it would have correctly setup AJC to perform the necessary weaving with the Spring Aspects library.
Do you have a script that we can use to reproduce this problem? Which version of Roo are you using? Does it do this if you run one of the sample scripts, such as:
Oct 4th, 2009, 03:20 AM
Thks for your reply.
Here is my roo script.
I follow what you said and I have the same results in surefire reports.
I'm using the last version of ROO => RC1, from the STS-SR01 package.
Oct 4th, 2009, 08:55 PM
That's really odd!
I'm going to release Roo 1.0.0.RC2 in the next few hours. If you'd be able to try it with that new release it would be great.
One suspicion is your AspectJ compiler and/or Spring Aspects JAR is somehow corrupt. It might be worth deleting some or all of your local ~/.m2/repository directory (just take a backup first in case you have a file in there that isn't in one of the public repositories).
Oct 6th, 2009, 12:21 PM
I tried with the RC2 and with an empty m2 repo.
It's the same results.
I send you my new roo script.
Oct 6th, 2009, 11:42 PM
I've been able to reproduce this bug. I've logged a Jira ticket at http://jira.springframework.org/browse/ROO-272 and will look at ASAP.
Oct 7th, 2009, 11:26 PM
Just a quick note I have fixed this bug. Please see the comments in Jira issue ROO-272 for how you can fix it at your end. Thanks for your patience and letting us know you had this problem so we could fix it.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.