I received a source code bundle. Inside the src directory tree there are some properties files(.properties) which I want to keep in the output jar in the same place. e.g: I want
src/main/java/com.mycompany/utils/Myclass.java src/main/java/com.mycompany/utils/Myclass.properties
to stay the same in the jar:
com.mycompany/utils/Myclass.class com.mycompany/utils/Myclass.properties
without needing to add the properties file it to separate resources folder. Is there a way to I tell this to maven?
You could add the following in your pom indicating that the resources are available in src/main/java
and including
the type of resources.
<build> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> </includes> </resource> </resources> </build>
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