Wiirt
Wiirt

Reputation: 25

How can I get the Maven Shade plugin to copy an arbitrary file to the jar

I am using the Maven Shade plugin to build an executable JAR file for one of my projects. It works well but I need to include an extra file in the JAR which is not included in other builds (and is not simply picked up from the project's target/ directory). How can I do this?

Upvotes: 0

Views: 1060

Answers (2)

khmarbaise
khmarbaise

Reputation: 97409

Just put that supplemental file into src/main/resources folder and that should do the trick.

Upvotes: 2

Pascal Thivent
Pascal Thivent

Reputation: 570365

I would consider moving (or copying) the file into a maven module instead of fighting against the way the plugin works.

Upvotes: 0

Related Questions