Maven / Eclipse / WTP - /src/main/resources not deployed

笑着哭i 提交于 2019-12-10 10:39:40

问题


I have a Maven/Web/Eclipse project running.

When I deploy in Eclipse, the contents of /src/main/resources are not deployed.

Here's my org.eclipse.wst.common.component file:

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="Grapevine">
        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
        <property name="context-root" value="Grapevine"/>
        <property name="java-output-path" value="/Grapevine/target/classes"/>
    </wb-module>
</project-modules>

Note - if I do mvn install the war is built correctly, including the resources files.

I'm using:

  • m2e 0.10.2.20100623-1649
  • Eclipse 3.5 (20090621-0832)
  • WTP 3.1.1

What am I missing?


回答1:


Is the compiler, by any chance, filtering the output folders?

Check if project properties -> Java Build Path -> source folders -> src/main/resources > excluded is anything other than (None).



来源:https://stackoverflow.com/questions/3685461/maven-eclipse-wtp-src-main-resources-not-deployed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!