Announcement Announcement Module
Collapse
No announcement yet.
Maven tests failure after clean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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).

        Comment


        • #5
          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.

          Comment


          • #6
            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.

            Comment


            • #7
              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.

              Comment

              Working...
              X