ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sachin Chowdhary" <csac...@pisoftek.com>
Subject Re: Including Directories while creating WAR File (New Bie)
Date Sun, 01 Jun 2003 09:19:55 GMT
Thanks Mark again
I have already done it but thanks for Reply.Actually we mention
only files type like inculde
**/*.jsp then it will include all directories whhci contains these files.So
i am learning i think ti should include include all file if we meintion
that
include all file **/*.* under  web Directory.

Well may be Ant want maore specific about files type.then what is reason
for
writing **/*.*.if it is not including all files and directory under it.

can any one tell me.


-----Original Message-----
From: mark.russel@pncbank.com [mailto:mark.russel@pncbank.com]
Sent: Friday, May 30, 2003 6:11 PM
To: Ant Users List
Subject: Re: Including Directories while creating WAR File (New Bie)


I'm assuming that you want all the code in the web directory in your war.
If you want to exclude certain directories then add exclude name="???"/> to
the list (say you want to excldue dtd it would look like <exclude name="
**/dtd"/>).

I'd try:
<property name="app.root" location="${basedir}"/>
<property name="web.root" value="${app.root}/web"/>
<property name="web.webinf" value="${web.root}/WEB-INF"/>
<target name="war" depends="compile">
  <war warfile="webi2v.war" webxml="${web.webinf}/web.xml">
  <fileset dir="${web.root}"/>
      <exclude name="**/*.jar"/>
      <exclude name="**/*.class"/>
      <exclude name="**/*.properties"/>
      <exclude name="**/web.xml"/>
    </fileset>
    <webinf dir="${web.webinf}" excludes="**/web.xml"/>
    <lib dir="${web.webinf}/lib"/>
    <classes dir="${web.webinf}/classes"
             includes="**/*.properties,**/*.classes"/>
             </war>
</target>


Thursday, May 29, 2003 11:47 AM
To: "'Ant Users List'" <user@ant.apache.org>
cc:
From: "Sachin Chowdhary" <csachin@pisoftek.com>
Subject: Including Directories while creating WAR File (New Bie)



Hi my Application has this Directory Struture while developing System

  WebApp
  |__build.xml
  |__build.properties
  |__build\
  |__src\
  |      |__com\
  |__web\
                |__css\
                |__dtd\
                |__img\
                |__xml\
                |__xsd\
                |__xsl\
                |__WEB-INF\
                        |__classes\
                        |__log4j.properties
                        |__lib\
                        |__tlds\
                        |__web.xml
              |__struts-config.xml

   Now i have to Deploy this Application.Intially i have used blank war
   file
   with struts and then create directories in WebApp Folder
   But now Problem is that when i am deploying it with Ant it is only
   creating

         |__WEB-INF\
         |__classes\
                     |__log4j.properties
                     |__lib\
                     |__tlds\
                     |__web.xml
              |__struts-config.xml

how can i include css,dtd,xml,xsl directories please help me.My build file
Target which is creating WAR file is.


<target name="war" depends="compile">
<war warfile="webi2v.war" webxml="./web/WEB-INF/web.xml">
             <fileset dir="./" includes="./web/**/*.*"
             excludes="**/web.xml">
               <exclude name="**/*.jar"/>
               <exclude name="**/*.class"/>
               <exclude name="**/*.properties"/>
               <include name="./web/css/*.*"/>
               <include name="./web/xml/*.*"/>
               <include name="./web/xsd/*.*"/>
               <include name="./web/javascript/*.*"/>
               <include name="./web/*.*"/>
             </fileset>
             <webinf dir="./web/WEB-INF" includes="**/*"
excludes="**/web.xml"/>
<lib dir="./web/WEB-INF/lib"/>
<classes dir="./web/WEB-INF/classes"
includes="**/*.properties,**/*.classes"/>
</war>




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



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



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






Mime
View raw message