Announcement Announcement Module
Collapse
No announcement yet.
Maven and AbstractDependencyInjectionSpringContextTests Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maven and AbstractDependencyInjectionSpringContextTests

    Has anyone succeeded at running a static application context in Maven?

  • #2
    I've used it for running tests. I load the applicationContext from the class path. If you store it in the source tree, you need to copy it across with something like:
    Code:
      <postGoal name="java&#58;compile">
        <copy todir="$&#123;maven.build.dest&#125;">
          <fileset dir="$&#123;pom.build.sourceDirectory&#125;">
            <include name="**/*.xml"/>
            <include name="**/*.dtd"/>
          </fileset>
        </copy>
      </postGoal>

    Comment


    • #3
      I am not sure if anyone tried the Spring context test cases with Maven but I doubt that the context is loaded only once per test run. I have opened a bug with Maven. For those who run into the same problem, you can follow it here:

      http://jira.codehaus.org/browse/MPTEST-44

      Let me know if I am wrong so I can change the status on Maven's JIRA.

      Comment

      Working...
      X