如何告诉 JBehave META-INF 使用 Maven 插件为 JPA 配置它?
我正在努力让 JBehave、JPA 和 Maven 能够很好地协同工作。我可以通过 eclipse 运行测试,一切正常。我通过 maven 运行它,JPA 找不到 persistence.xml 文件。然而,我的单元测试发现 persistence.xml 文件很好,但 JBehave 不参与其中。
显然,我需要告诉 JBehave 在 src/main/resources 中查找 META-INF/persistence.xml 文件,或者至少将其放在类路径中。有办法做到这一点吗?
org.jbehave jbehave-maven-插件 2.3-rc1 运行场景发现 测试 测试 测试/nsfw/bmp/partymodel/PartySearch.java 测试/nsfw/bmp/partymodel/RealtionshihpFunctionality.java 运行场景
I'm trying to get JBehave, JPA and Maven to play nicely together. I can run the test via eclipse and everything works just fine. I run it via maven, and JPA can't find the persistence.xml
file. However a unit test I have finds the persistence.xml
file just fine, but JBehave is not involved.
Clearly I need to tell JBehave to look in src/main/resources
for the META-INF/persistence.xml
file, or get it on the classpath at least. Is there a way to do that?
org.jbehave
jbehave-maven-plugin
2.3-rc1
run-scenarios-found
test
test
test/nsfw/bmp/partymodel/PartySearch.java
test/nsfw/bmp/partymodel/RealtionshihpFunctionality.java
run-scenarios
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我快速检查了 jbehave-maven-plugin 源代码,这可能是类加载器问题。但如果没有更多细节(例如您使用的插件版本、您运行的阶段、pom.xml),我唯一能做的建议就是在这里提出一个问题:http://jira.codehaus.org/browse/JBEHAVE/component/12482。
I checked out quickly the jbehave-maven-plugin sources and it may be classloader issue. But without more details (e.g. the plugin version you use, the phase you run, the pom.xml), the only suggestion I can do is to open an issue here: http://jira.codehaus.org/browse/JBEHAVE/component/12482.