You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "William I. Zumwalt" <wi...@yahoo.com> on 2004/08/27 18:06:24 UTC

help w/ jar files

In case this gets posted a few times ... apologies.

How do I include the files under the 'web' directory
as shown in the 'includes' attribute, yet not include
the 'web' directory itself? In otherwords, I want the
files under 'web' to be in the top level of the jar
file just as 'com/**' does. 

<jar destfile = "${proj.dist}/${proj.name}.war"
    basedir = "${proj.temp}"
    includes = "web/**, com/**"
    excludes = "com/comp/management/ejb/**, META-INF">
</jar>

---
The dir structure ${proj.temp} looks like ...

|- web/
|   |- *.html, *.vm, etc...
|   |- META-INF/ (for web-app)
|   |- WEB-INF/
|
|- com/
|   |- *.class
|   
|- META-INF/ (for ejb's)


Any help much appreciated.
Will





		
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

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


Re: help w/ jar files

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hi,
I think you need two nested filesets in your invocation of
the jar task.

 <jar destfile = "${proj.dist}/${proj.name}.war"
     basedir = "${proj.temp}"
      <fileset dir=".">
         <include name="com/**"/>
         <exclude name="com/comp/management/ejb/**"/>
      </fileset> 
      <fileset dir="web">
         <exclude name="META-INF/**"/>
      </fileset> 
 </jar>

Cheers,
Antoine
> In case this gets posted a few times ... apologies.
> 
> How do I include the files under the 'web' directory
> as shown in the 'includes' attribute, yet not include
> the 'web' directory itself? In otherwords, I want the
> files under 'web' to be in the top level of the jar
> file just as 'com/**' does. 
> 
> 
> ---
> The dir structure ${proj.temp} looks like ...
> 
> |- web/
> |   |- *.html, *.vm, etc...
> |   |- META-INF/ (for web-app)
> |   |- WEB-INF/
> |
> |- com/
> |   |- *.class
> |   
> |- META-INF/ (for ejb's)
> 
> 
> Any help much appreciated.
> Will


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