Including hidden files in a war file using the jar command

I am trying to create a war file on Mac OSX in terminal. I am trying to include a hidden subdirectory of configuration files. For some reason, the war file does not include a hidden subdirectory.

The command I use is:

jar cvf myWar.war * 

The contents of the file are two html files and one directory ".ebextensions"

Am I doing something wrong? It seems like it should be easier than I do.

Thanks!

+4
source share
1 answer

Try to enter

jar cvf myWar.war * .[!.]*

With this command you also include all directories / files starting with a period, but exclude . and ..

+5
source

Source: https://habr.com/ru/post/1480756/


All Articles