【问题标题】:Why does eclipse not find the beans.xml files in a spring based Maven project为什么eclipse在基于spring的Maven项目中找不到beans.xml文件
【发布时间】:2011-03-10 15:59:18
【问题描述】:

我在 eclipse 下有一个 m2eclipse 的 maven 项目。

当运行集成测试时,测试失败并提到在类路径中找不到 spring 配置文件,并且我从 log4j 收到类似的错误。

我的印象是 m2eclipse 会将资源目录添加到类路径中,但显然不会。

我做错了什么?

【问题讨论】:

    标签: eclipse spring maven-2 testing m2eclipse


    【解决方案1】:

    有时 m2eclipse 不会按需要移动资源。我还没有真正弄清楚为什么。无论如何:一个简单的解决方案是保持外壳打开并执行

    mvn resources:resources
    

    或在 m2eclipse 中,使用Run Configurations -> Maven Build -> new Launch Configuration 将目标设置为:process-resources(生命周期)或 resources:resources(插件目标)创建一个新的运行配置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-21
      • 2011-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-04
      • 1970-01-01
      • 2015-07-25
      相关资源
      最近更新 更多