How to Exclude poperties file from jar file ?
Posted
by Nisarg Mehta
on Stack Overflow
See other posts from Stack Overflow
or by Nisarg Mehta
Published on 2010-04-28T11:31:55Z
Indexed on
2010/04/28
11:53 UTC
Read the original article
Hit count: 387
Hi All,
I have a java application for exaple see below.
myProject
|
|----src
| |
| |--main
| |
| |--resources
| |
| |--userConfig.properties
| |--log4j.properties
|
|---target
I am using Maven to build my project .I am using maven command to build jar file.
mvn package -DMaven.test.skip=true
I want to exclude userConfig.properties file from my jar file so i have mentioned in pom.xml as below.
<excludes>
<exclude>**/userConfig.properties</exclude>
</excludes>
but it will exclude from the target folder in which compile code resides. And Application will not run because it will not find the userConfig.properties.
Can anyone help me ?
Thanks Nisarg Mehta
© Stack Overflow or respective owner