Why is the Maven JAR plugin not including some resources?

后端 未结 1 962
情深已故
情深已故 2021-01-12 00:08

I have an enterprise application which I am in the process of converting from an Ant build to Maven. It\'s almost completely converted; this is the very last thing I need t

相关标签:
1条回答
  • 2021-01-12 00:16

    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.

    0 讨论(0)
提交回复
热议问题