I've got an ant jar task:
<target name="jar"> <jar destfile="${generated.jars.dir}/hello-${environment}.jar"> <fileset dir="${generated.classes.dir}"/> <fileset dir="${environment.dir}/${environment}" includes="config.xml"/> </jar> </target>
How can I force the config.xml file to be pushed to a specific directory in the jar rather than at the root level, say in /database/config.xml or something like that...
PS: The reason for doing this is that I can have a hello-local.jar, hello-dev.jar, hello-qa.jar, etc.
Use a zipfileset
like this:
<jar destfile="${generated.jars.dir}/hello-${environment}.jar"> <fileset dir="${generated.classes.dir}"/> <zipfileset dir="${environment.dir}/${environment}" includes="config.xml" fullpath="database/config.xml"/> </jar>
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