You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jeff Ousley <je...@yahoo.com> on 2003/05/01 16:34:21 UTC

Re: how to get a jar target to include subdirs in the jar

Anyone know how to accomplish this in ant with a jar
target?

--- Jeff Ousley <je...@yahoo.com> wrote:
> Hello!
> 
> How do I get a jar target to include all the class
> files in a directory called "build" and the entire
> "images" directory from a directory called "src" so
> the structure of the jar file is:
> 
> ./a.class
> ./b.class
> ./c.class
> ./images/a.gif
> ./images/b.gif
> 
> Does this make sense?
> 
> thanks!
> -jeff
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: how to get a jar target to include subdirs in the jar

Posted by Matt Benson <gu...@yahoo.com>.
The easy way is to copy your images directory into
your build directory and get everything from the build
directory into your jar.

or this will pretty much do what you want...

<jar jarfile="${dist.home}/${jar.name}"
     filesonly="true">
  <zipfileset dir="build" includes="**/*.class" />
  <zipfileset dir="${src.home}" excludes="**/*.java"
/>
</jar>

-Matt

--- Jeff Ousley <je...@yahoo.com> wrote:
> Anyone know how to accomplish this in ant with a jar
> target?
> 
> --- Jeff Ousley <je...@yahoo.com> wrote:
> > Hello!
> > 
> > How do I get a jar target to include all the class
> > files in a directory called "build" and the entire
> > "images" directory from a directory called "src"
> so
> > the structure of the jar file is:
> > 
> > ./a.class
> > ./b.class
> > ./c.class
> > ./images/a.gif
> > ./images/b.gif
> > 
> > Does this make sense?
> > 
> > thanks!
> > -jeff
> > 
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
> > http://search.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com