Using java, is there a way to extract jar file such that i can look for certain package, and list out out all the files belong to that particular package? Hope for some guidelines and helpful resouces.
A jar file is actually just a zip file. You can use the java.util.jar package to look through a jar file and find whatever entries you want; for example, this prints out the name of each entry in a jar file:
Then, i add a new file, called test.xml under the main root of the project, then use the above code to loop through the files, test.xml doesnt seem to get listed. And i found from this site http://www.cezwright.com/tools/java/jar_war_ear.htm, that jar doesnt include xml file, but then pom.xml get listed, but not test.xml which has been newly added.
Besides, if i were to package everything in war, how to do the settings in pom.xml?