Add file to jar during maven build

I have xslt that I want to add to my jar file when I do the maven build. I read that in the documentation you can add material to the resources folder and it will be raised, but what if I want it to appear in another folder - how do I get it to go there in the bank?

+3
source share
1 answer

If it's a JAR, just add it to src/main/resources, replicating the folder structure you want to be present in the JAR (the root class path for the JAR is the very first level on it, so it's easy).

In the case of WAR or other types of packages, the method is very different

+8
source

Source: https://habr.com/ru/post/1773911/


All Articles