Why is the Maven JAR plugin not including some resources?

痴心易碎 提交于 2019-12-01 16:34:18

I figured out the answer RIGHT after submitting this question.

In a parent POM, I had the following:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.4</version>
    <configuration>
        <includes>
            <include>**/*.class</include>
            <include>**/*.jdo</include>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
        </includes>
    </configuration>
</plugin>

I added **/*.ftl to the list of includes and now it's working.

EDIT: Better yet, I removed the configuration tag entirely, and it's still working. I think it was a remnant from before I figured out that the .properties files and other things I needed on the classpath needed to be in src/main/resources and not src/main/java.

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