Copy and rename file

84 views
Skip to first unread message

Phil Hyde

unread,
Aug 15, 2016, 10:59:40 AM8/15/16
to izpack-user
Hello,

I am trying to create an installer.  One of our manual steps is to copy an artifact of our build process (.war file) to the Apache Tomcat 'webapps' folder, and rename it to "ROOT.war".

Is there a simple way to rename a file after unpacking it?

thanks,
Phil

René Krell

unread,
Aug 16, 2016, 3:43:52 AM8/16/16
to izpack-user
Dne pondělí 15. srpna 2016 16:59:40 UTC+2 Phil Hyde napsal(a):
I am trying to create an installer.  One of our manual steps is to copy an artifact of our build process (.war file) to the Apache Tomcat 'webapps' folder, and rename it to "ROOT.war".

Is there a simple way to rename a file after unpacking it?

Hi Phil,

for the purpose of renaming a single file <singlefile> is the best choice for you. Simply set the target attribute to the file name of your choice.  See https://izpack.atlassian.net/wiki/x/7IAH.

Greetings,
René


Phil Hyde

unread,
Aug 16, 2016, 12:06:14 PM8/16/16
to izpac...@googlegroups.com
Thanks René!  That worked great.

Is there any way to copy files after they are unzipped from an archive?  The compiler complains that files do not exist.


--
You received this message because you are subscribed to a topic in the Google Groups "izpack-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/izpack-user/yYMncdr8uJM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to izpack-user+unsubscribe@googlegroups.com.
To post to this group, send email to izpac...@googlegroups.com.
Visit this group at https://groups.google.com/group/izpack-user.
For more options, visit https://groups.google.com/d/optout.

René Krell

unread,
Aug 17, 2016, 2:54:13 AM8/17/16
to izpack-user


Dne úterý 16. srpna 2016 18:06:14 UTC+2 Phil Hyde napsal(a):

Is there any way to copy files after they are unzipped from an archive?  The compiler complains that files do not exist.


What you need is probably the combination <file src="archive.zip" unpack="true" />, see https://izpack.atlassian.net/wiki/x/6IAH.
Unfortunately, there is currently no way implemented for renaming files extracted from an archive.

Phil Hyde

unread,
Aug 18, 2016, 11:31:34 AM8/18/16
to izpack-user
Thanks Rene.  Our current build process creates a zip file with a bunch of miscellaneous files.   I ended up solving this problem by just unzipping that content and using it directly in the installer.

René Krell

unread,
Aug 18, 2016, 11:46:39 AM8/18/16
to izpack-user

Dne čtvrtek 18. srpna 2016 17:31:34 UTC+2 Phil Hyde napsal(a):
This is where Maven is your friend and has the better possibilities, of course.
You can open a feature request in JIRA, if you need a special enhancement for archives. 
Reply all
Reply to author
Forward
0 new messages