سؤال

I am trying to create a war file in unix using the command "jar cfv warfile.war * ." and getting an "index.jspjava.util.zip.ZipException: duplicate entry" error. When I search on the file it flags as a duplicate, I do find that same file twice, but in different directories. Is there an option or something I'm missing to maintain the directory structure like winzip has?

هل كانت مفيدة؟

المحلول

I think your problem is that you have both * (all files in this directory) and . (the current directory). You either want:

jar cfv warfile.war .

or

jar cfv warfile.war *

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top