Announcement Announcement Module
Collapse
No announcement yet.
Split a Roo project into two Maven Modules Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Split a Roo project into two Maven Modules

    I have a Spring Roo JSF project that I want to split into two Maven Modules so I can reuse some of the classes in a jar file for other projects.

    I created a new Maven simple project to act as the Super Pom.

    Then I created a Maven Module project with a jar packaging with that Super Pom as the parent.

    Then I created a Maven Module project with a war packaging with that Super Pom as the parent.

    I copied the desired jars into the source path of the jar project and everything else into the same paths in the war project.

    I enabled the Java Server Faces facet on the war project.

    I added a dependency in the war project pom to the jar artifact of the jar project.

    The jar project won't build because the tests all throw..."Failed to load ApplicationContext" even though all the test classes came from Roo and all have the same annotations...

    Code:
    @Configurable
    @RunWith(SpringJUnit4ClassRunner.class)
    @ContextConfiguration(locations = "classpath:/META-INF/spring/applicationContext*.xml")
    Everything seems to be in the right location and I checked the build path too.

    When I leave all the classes in the war project it runs just like before. When I add the jar dependency the war project won't install with the same test errors (I know surprise, just giving all I can give)

    Anybody have a clue what I might be missing?
Working...
X