I want to include config.properties file and all the json files present in resources folder in my jar. But none of the file is getting added to the jar. If I use only one include tag then those files are getting added to the jar. Please help me add all jsonm and config.properties file to the jar.
<!-- Export configuration files to build directory -->
<copy todir="${output.dir}/configuration">
<fileset dir="configuration">
<include name="**/config.properties"/>
<include name="**/*.json"/>
</fileset>
</copy>
<!-- Put exported configuration files on classpath -->
<fileset id="extra.jar.files" dir="${output.dir}/configuration">
<filename name="**/config.properties"/>
<filename name="**/*.json" />
</fileset>
Try this:
<copy todir="${output.dir}/configuration">
<fileset dir="configuration" includes="*/.json"/>
<fileset dir="configuration" includes="**/config.properties"/>
</copy>
Refer this link