You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Anuj Agrawal <ag...@yahoo.com> on 2003/06/06 11:55:40 UTC
REPOST: WAR/EAR and empty dirs
Hi -
Is there a way to include empty directories in the war/ear file when using
the war/ear task?
Thanks.
Anuj.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: REPOST: WAR/EAR and empty dirs
Posted by Anuj Agrawal <ag...@yahoo.com>.
Hmm.. thanks for your response.. however, according to the
documentation, the filesonly parameter is, by default, "false" in the
war task.. but it still doesn't include empty directories.. could this
be a bug?
Anuj.
--- Tom Maccariella <tm...@yahoo.com> wrote:
> To clarify, set the "filesonly" parameter to "false" as shown in the
> example. I had it backwards in my answer. Sorry for the confusion.
>
> Tom
>
> Tom Maccariella <tm...@yahoo.com> wrote:
> The WAR and EAR tasks extend from the JAR task, which in turn extends
> from the ZIP task. All of these tasks support the "filesonly"
> parameter. If set to "true", both files *and* folders will be added
> to the archive. By default, only files are included along with the
> folder information for each file -- but not the actual folder. When
> the archive is extracted, you may think that folders were included
> since folders are created that have files within. But empty
> directories are not included.
>
> So, to answer your question, just set the "filesonly" paramter to
> "true". A simple example using the jar task is shown below:
>
> Hope this helps,
> Tom
>
> Anuj Agrawal wrote:
> Hi -
> Is there a way to include empty directories in the war/ear file when
> using
> the war/ear task?
> Thanks.
> Anuj.
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: REPOST: WAR/EAR and empty dirs
Posted by Tom Maccariella <tm...@yahoo.com>.
To clarify, set the "filesonly" parameter to "false" as shown in the example. I had it backwards in my answer. Sorry for the confusion.
Tom
Tom Maccariella <tm...@yahoo.com> wrote:
The WAR and EAR tasks extend from the JAR task, which in turn extends from the ZIP task. All of these tasks support the "filesonly" parameter. If set to "true", both files *and* folders will be added to the archive. By default, only files are included along with the folder information for each file -- but not the actual folder. When the archive is extracted, you may think that folders were included since folders are created that have files within. But empty directories are not included.
So, to answer your question, just set the "filesonly" paramter to "true". A simple example using the jar task is shown below:
Hope this helps,
Tom
Anuj Agrawal wrote:
Hi -
Is there a way to include empty directories in the war/ear file when using
the war/ear task?
Thanks.
Anuj.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Thanks,
Tom
Tom Maccariella
tmacc_nj@yahoo.com
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
Re: REPOST: WAR/EAR and empty dirs
Posted by Tom Maccariella <tm...@yahoo.com>.
The WAR and EAR tasks extend from the JAR task, which in turn extends from the ZIP task. All of these tasks support the "filesonly" parameter. If set to "true", both files *and* folders will be added to the archive. By default, only files are included along with the folder information for each file -- but not the actual folder. When the archive is extracted, you may think that folders were included since folders are created that have files within. But empty directories are not included.
So, to answer your question, just set the "filesonly" paramter to "true". A simple example using the jar task is shown below:
<project name="emptyDirs" basedir="." default="makeJar">
<target name="makeJar" depends="init">
<jar jarfile="test.jar" basedir="." filesonly="false"/>
</target>
</project>
Hope this helps,
Tom
Anuj Agrawal <ag...@yahoo.com> wrote:
Hi -
Is there a way to include empty directories in the war/ear file when using
the war/ear task?
Thanks.
Anuj.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Thanks,
Tom
Tom Maccariella
tmacc_nj@yahoo.com
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).