Announcement Announcement Module
No announcement yet.
No src/test/resources directory created....can't run tests Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • No src/test/resources directory created....can't run tests

    I'm beginning to learn how to use Roo and I'm using STS as my IDE.
    STS 3.0.0.M3
    Roo 1.2.2

    I create a new Roo project

    project --topLevelPackage sample --projectName Sample --java 6 --packaging JAR

    And it goes off and creates a bunch of stuff, but there is an immediate error in the project because the source directory src/test/resources doesn't exist. It never gets created.

    I then do some stuff and eventually want to run the tests and it fails with the following exception:

    java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.TestContext.getAp plicationContext(

    I'm assuming that the exception is because there is no test resources created, i.e. not just a missing directory, but missing files within that directory as well.

    Is there some Roo command that I can use to create the test resources?

  • #2
    As a followup, if I just manually configure the build path to not look for src/test/resources as a source directory, everything works fine.