Results 1 to 7 of 7

Thread: Maven tests failure after clean

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    7

    Default Maven tests failure after clean

    Hi,
    I create some mock tests for my entities.

    If I run mvn clean test, it failed because
    Code:
    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?

    Thank you,
    Emmanuel.

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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:

    mkdir tst
    cd tst
    roo
    script clinic.roo
    quit
    mvn test
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3
    Join Date
    Sep 2009
    Posts
    7

    Default

    Hello,

    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.

    Thank you,
    Emmanuel.
    Attached Files Attached Files

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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).
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  5. #5
    Join Date
    Sep 2009
    Posts
    7

    Default

    Hi,
    I tried with the RC2 and with an empty m2 repo.
    It's the same results.

    I send you my new roo script.

    Thks,
    Emmanuel.
    Attached Files Attached Files

  6. #6
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •