ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lothar Krenzien <lkrenz...@web.de>
Subject problems creating war file
Date Tue, 08 Nov 2005 17:21:39 GMT

Hi there,

I'm trying to create a war file using the Ant war-task. The creted file seems to be ok but
all the files under WEB-INF/classes and WEB-INF/lib exists twice or even 3-times (with the
same name in the same dir). Of course I can skip the duplicate files but it confuse me ;)

My app looks like (for testing reasons I'm using a temporay directory) :

C:\Temp\ant-test\application
|
| ----src
|       |
|       -- com ....
|
| ----web
|       |
|       ---- css / js / jsp / Meta-INF / Web-INF ...
|
| ----deployment (temporary working dir)

The Ant script copies all files under src/com and web to the deployment dir, compiles the
classes (put it under the Web-INF/classes) and then building a war-archive using the Ant war-task.

Here's my Ant script:

<war destfile="${outDir}/conergy.war" webxml="${outDir}/web/conergy/WEB-INF/web.xml">
<metainf dir="${outDir}/web/webapp/META-INF"/>
<webinf dir="${outDir}/web/webapp/WEB-INF" />
<lib dir="${outDir}/web/webapp/WEB-INF/lib"/>
<classes dir="${outDir}/web/webapp/WEB-INF/classes"/>

<zipfileset dir="${outDir}/web/webapp/css" prefix="css"/>
<zipfileset dir="${outDir}/web/webapp/js" prefix="js"/>
<zipfileset dir="${outDir}/web/webapp/jsp" prefix="jsp"/>
<zipfileset dir="${outDir}/web/webapp/image" prefix="image"/>
</war>

The created war-file looks like :
<root>
|
| -- css
|
| -- js
|
| -- jsp
|
| -- Web-INF
| |
| | -- classes
|
|
| -- Meta-INF

and so on.

Thanks, Lothar


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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


Mime
View raw message