Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-427

persistence.xml being ignored in test path when in test/resources/META-INF

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Won't Fix
    • 2.4
    • None
    • None
    • Ubuntu Linux 7.10 (Gutsy Gibbon)
      Java 1.5.0_11
      Maven 2.0.8
      TestNG 5.7 (jdk5)

    Description

      The file
      src/test/resources/META-INF/persistence.xml
      is not included in the test path.
      When this file is moved to
      src/main/resources/META-INF/persistence.xml
      then it is loaded correctly.

      The attached application will fail to build, complaining about no default persistence unit in the deployment

      I'm confused why it isn't working as the META-INF directory in the test resources does contain another file that IS picked up during the test by JBoss Embedded (file: components.xml).

      This is using Maven 2.0.8 which explicitly states in its release notes:
      "MNG-3118 - Test-classes should come before classes in the classpath.
      This may slightly alter behavior of tests. The test-classes is now
      included first in the classpath to allow test resources to override
      normal runtime ones."

      I have emailed the users list and not received a response. Is there anything I could try to help?

      Attachments

        1. seamMavenExample-20080104.tar.bz2
          44 kB
          Cory Prowse
        2. SUREFIRE-427_Test.zip
          48 kB
          Cory Prowse

        Activity

          People

            Unassigned Unassigned
            cosmic Cory Prowse
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: