How to instruct Maven to ignore my main/resources/persistence.xml in favor of test/…?

前端 未结 4 585
庸人自扰
庸人自扰 2021-02-07 08:28

I have two persistence.xml files, for the sake of testing:

  • src/main/resources/META-INF/persistence.xml
  • src/test/resources/
4条回答
  •  执念已碎
    2021-02-07 09:09

    Better add both files - in general, making test/production or debug/profile/production distinction in build makes only trouble. Better try to use different perasistence unit name for production (say abc-production) and for tests (abc-tests).

提交回复
热议问题