ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: problems creating a jar
Date Wed, 20 Feb 2008 15:56:49 GMT
Luca Ferrari wrote:
> On Wednesday 20 February 2008 Dimitris Mouchritsas's cat, walking on the 
> keyboard, wrote:
>> So for example you create:
>> /dist
>>    tmp/
>>       classes/
>>       img/
>>       lib/
>>
>> and then you <jar destfile="${dist.dir}/${build.jar.name}"
>> basedir="${dist.dir}/tmp/"> etc.
> 
> But in this case into the jar I will have also the classes directory, while it 
> should be present only the package tree, isn't it?
> Thanks for you suggestion, but is there any way to get the jar task working 
> with the fileset, since I've got already a tree structure that contains 
> everything I have to place in the jar?

Use <zipfileset> and its prefix attribute

  <zipfileset dir="build/classes" prefix="WEB-INF/classes"/>
-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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


Mime
View raw message