I have a mavenized project with jar packaging, have standard layout:
/src/main/java
/src/main/resources
When I execute: mvn package
I am expecting the resulting jar (non-executing) file to include the resources folder and everything inside that folder from the project(i.e. some xml files), but when I open the jar file I only see the com folder where and the contents of the resources folder in the top level...
I think the above is default for maven3, but I want to include the resources
folder in the jar file...
You will not see src/main/resources
in resulted jar file.
You will only see the contents of src/main/resources
in the jar file.
So, if you did not create a package structure for your resource files and dumped everything into src/main/resources
directory, you will see your resource files at the top level of your jar.
If you want your resources appear under certain directory in the resulting jar file, create such a directory under src/main/resources
tree.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With