You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rez <po...@hotmail.com> on 2008/10/22 02:43:52 UTC

Help with war file

I'm not sure if it's possible any other way to pack a folder and all of its subfolders and files into a war file, preserving their path and folder structure, other than using the "prefix" attribute of the zipfileset task.
I would like my war file (testproject.war) to have folderx & all its files at its root, so currently I'm using
 
<zipfileset dir="folderx" includes="**/*" prefix="folderx"/>
 
But it's creating a problem when the files are deployed under jboss and my url looks like something like this:
 
http://localhost:8080/testproject/folderx/folderx/images/test.gif
 
As you can see it's repeating the folder name twice.
 
Thanks
_________________________________________________________________
When your life is on the go—take your life with you.
http://clk.atdmt.com/MRT/go/115298558/direct/01/

RE: Help with war file

Posted by Rez <po...@hotmail.com>.
Thanks Mark.  I did omit the prefix attribute and files at the root of folderx got dumped at the root of the war file and since I do have some files with duplicate names at the root already and the duplicate attribute in the war task being set to fail, my war target failed miserably.  I do want the folderx entry in the war file but I was wondering if there's any other way possible to do this besides using zipfileset.  I'll play around to see if I can fix it. Thanks again.
 
> Date: Wed, 22 Oct 2008 08:51:22 +0100> From: marksalter@talktalk.net> To: user@ant.apache.org> Subject: Re: Help with war file> > Rez wrote:> > I'm not sure if it's possible any other way to pack a folder and all> > of its subfolders and files into a war file, preserving their path> > and folder structure, other than using the "prefix" attribute of the> > zipfileset task. I would like my war file (testproject.war) to have> > folderx & all its files at its root, so currently I'm using> > > > <zipfileset dir="folderx" includes="**/*" prefix="folderx"/>> > Can you use the war task instead:-> > http://ant.apache.org/manual/CoreTasks/war.html> > > > > But it's creating a problem when the files are deployed under jboss> > and my url looks like something like this:> > > > http://localhost:8080/testproject/folderx/folderx/images/test.gif> > > > As you can see it's repeating the folder name twice.> The zip examples clearly show that the zip structures have the prefix> added followed by the source dir, why don't you just drop the prefix in> this instance?> > -- > Mark> > ---------------------------------------------------------------------> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org> For additional commands, e-mail: user-help@ant.apache.org> 
_________________________________________________________________
You live life beyond your PC. So now Windows goes beyond your PC.
http://clk.atdmt.com/MRT/go/115298556/direct/01/

Re: Help with war file

Posted by Mark Salter <ma...@talktalk.net>.
Rez wrote:
> I'm not sure if it's possible any other way to pack a folder and all
> of its subfolders and files into a war file, preserving their path
> and folder structure, other than using the "prefix" attribute of the
> zipfileset task. I would like my war file (testproject.war) to have
> folderx & all its files at its root, so currently I'm using
> 
> <zipfileset dir="folderx" includes="**/*" prefix="folderx"/>

Can you use the war task instead:-

	http://ant.apache.org/manual/CoreTasks/war.html

> 
> But it's creating a problem when the files are deployed under jboss
> and my url looks like something like this:
> 
> http://localhost:8080/testproject/folderx/folderx/images/test.gif
> 
> As you can see it's repeating the folder name twice.
The zip examples clearly show that the zip structures have the prefix
added followed by the source dir, why don't you just drop the prefix in
this instance?

-- 
Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org