I'm using Maven to build a Java project, and I've got a couple files, CHANGELOG
and LICENSE
, that I'd like to copy to the META-INF
directory inside the JAR file.
So far what I've got working is the following:
<build>
<resources>
<resource>
<directory>${project.basedir}</directory>
<includes>
<include>CHANGELOG</include>
<include>LICENSE</include>
</includes>
<targetPath>META-INF</targetPath>
</resource>
</resources>
<plugins>
...
but that also copies those two files to the classes/META-INF
directory when compiling.
So I'd like the files to be included in the JAR file, but nowhere else. Is there a way to do this?