You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Paul Selibas <ps...@gmail.com> on 2007/04/05 08:03:06 UTC

Jar/Zip Update

Hello all...

I have an apache ant script that is supposed to add a rar file to a
jar file. Its a simple as that but it does not work. I have tried
everything (except the right thing) and i have googled my brains out
and read the archives.

My script is as follows which gives me some sort of result.

<jar destfile="c:/build/Myfile.jar" basedir="" update="yes">
   <zipgroupfileset dir="." includes="${rarfile}" />
</jar>

This is the closest i get and what it does is unzips the rarfile and
puts each file into the jar file. I want to put the whole rar file in
the Jar. I tries other things such as:

<jar destfile="c:/build/Myfile.jar" basedir="" update="yes"
includes="${rarfile}" />

This does nothing at all... Ant just ignores it with absolutely no
message even in verbose mode.

I am completely lost and frustrated so any information would be
greatly appreciated.



Paul Selibas

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


Re: Jar/Zip Update

Posted by Dominique Devienne <dd...@gmail.com>.
On 4/5/07, Paul Selibas <ps...@gmail.com> wrote:
> I have an apache ant script that is supposed to add a rar file to a
> jar file.

> <jar destfile="c:/build/Myfile.jar" basedir="" update="yes">
>    <zipgroupfileset dir="." includes="${rarfile}" />
> </jar>
>
> This is the closest i get and what it does is unzips the rarfile and
> puts each file into the jar file. I want to put the whole rar file in
> the Jar.

I guess rar must be a close cousin to zip then, but yes, that's the
expected behavior.

> <jar destfile="c:/build/Myfile.jar" basedir="" update="yes"
> includes="${rarfile}" />

The empty basedir looks strange, and you haven't shown how 'rarfile'
is defined. It should be a relative file path, from basedir.
Otherwise, do:

<jar destfile="c:/build/Myfile.jar" update="yes">
  <fileset file="${rarfile}" />
</jar>

--DD

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