How to add TXT file to the WAR archive using command-line in MS Windows
10,778
Finally i got answer, for this i used.
mkdir c:/WEB-INF
cd WEB-INF
xcopy D:/key.txt C:/WEB-INF
jar uvf app.war /WEB-INF/key.txt
No need of unzipping and again zipping.
Author by
Tamanna Iruu
Updated on June 04, 2022Comments
-
Tamanna Iruu almost 2 years
I have key.txt file in E:/ drive and app.war file in C:/ drive. How to copy key.txt to the subfolder of the app.war file i.e WebContent/WEB-INF. Key should copy to the WEB-INF folder. I want result like(after unzipping war file)
WebContent | |->META-INF |->WEB-INF | |->key.txt
-
Tamanna Iruu about 10 yearsJames cp command is not working I try with cp and also xcopy.
-
earldouglas about 10 yearsHow about
copy
? I'll grab a Windows box in a little while and correct my answer. -
earldouglas about 10 yearsI updated the commands above to work in a Windows environment.