java - wrong JAR packaging in ant file with zipfileset -


i'm encountering strange issue in ant file use building java app. when generating jar file, include resource files (images, fonts , config files) in jar using zipfileset, this:

                    <zipfileset dir="src/res" prefix="res"/>                 <zipfileset dir="src/res/images" prefix="res/images" />                 <zipfileset dir="src/res/images/bubbles" prefix="res/images/bubbles"/>                 <zipfileset dir="src/res/images/clocks" prefix="res/images/clocks"/>                 <zipfileset dir="src/config" prefix="res/config"/>                 <zipfileset dir="src/ontology" prefix="res/ontology"/> 

to mantain original structure, looks this:

res  |-images  |   |-bubbles  |   |-clocks  |-fonts  |-config  |-ontology 

so replicated within jar, i'm using prefix parameter in zipfileset. thing i'm getting duplicated images in res/images , triple images (3 copies of same image) in of res/images/bubbles , res/images/clocks folders, which, in other hand, 2 , 3 depth levels respectively. res/config , res/ontology correct, no duplicated files there...a screenshot see mean:

enter image description here

i forgot mention, obviously, have 1 instance of each image in every folder. ideas causing behaviour?

regards, alex

ant told do. told him to:

  • pack files under src/res , map them res.
  • pack files under src/res/images , map them res/images
  • pack files under src/res/images/bubbles , them under res/images/bubbles

now let's assume have src/res/images/bubbles/activity_bubble_orange.png files. file contained in first zipfileset, second zipfileset , third zipfileset. ergo packed 3 times.

to want need single <zipfileset dir="src/res" prefix="res" /> filter contents using includes/excludes filters.

see here: http://ant.apache.org/manual/types/zipfileset.html type of fileset. , here: http://ant.apache.org/manual/types/fileset.html see how specify includes/excludes filter fileset.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -