You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Maris Orbidans <M....@datapro.lv> on 2003/07/01 16:08:07 UTC

RE: Ant book review in JavaPro July 2003

Hello

I created a task to deploy JSP files, however it's not working as I expect.

If I use <fileset> with <include> or <exclude> tag, than sometimes files aren't copied.

For example, this task doesnt copy JSP files properly.

<target name="deployJSPfiles">
    <copy todir="${tomcat.home}/webapps/iaks">
        <fileset dir="${webapp.root}" includes="*.jsp">
            <include name="*.jsp"/>
        </fileset>
    </copy>
</target>

Sometimes there is a new JSP file in ${webapp.root}/tiles which doesnt exist in ${tomcat.home}/webapps/iaks/tiles,
however the task doesnt copy the file.

could someone help me ?

Maris Orbidans



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


Re: Problem with fileset [was : Ant book review in JavaPro July 2003]

Posted by Peter Smith <ps...@infonow.com>.
Maris,

I see you also specified an includes in the fileset and an <include>
element.  Includes in the fileset is the same as a list of <include>
elements.  So  

<fileset dir="dir" includes="*.jsp,*.html"/>

is the same as

<fileset dir="dir>
  <include name="*.jsp"/>
  <include name="*.html"/>
</fileset>

Peter
-- 
Peter Smith
Software Engineer
InfoNow Corporation

> From: "Antoine Levy-Lambert" <an...@antbuild.com>
> Reply-To: "Ant Users List" <us...@ant.apache.org>
> Date: Tue, 1 Jul 2003 16:13:20 +0200
> To: "Ant Users List" <us...@ant.apache.org>
> Subject: Re: Problem with fileset [was : Ant book review in JavaPro July 2003]
> 
> try this
> with ** in the include pattern, the ${webapp.root} and its subdirs will be
> scanned
> <target name="deployJSPfiles">
>   <copy todir="${tomcat.home}/webapps/iaks">
>       <fileset dir="${webapp.root}" >
>           <include name="**/*.jsp"/>
>       </fileset>
>   </copy>
> </target>
> 
> ----- Original Message -----
> From: "Maris Orbidans" <M....@datapro.lv>
> To: "Ant Users List" <us...@ant.apache.org>
> Sent: Tuesday, July 01, 2003 4:08 PM
> Subject: RE: Ant book review in JavaPro July 2003
> 
> 
> 
> Hello
> 
> I created a task to deploy JSP files, however it's not working as I expect.
> 
> If I use <fileset> with <include> or <exclude> tag, than sometimes files
> aren't copied.
> 
> For example, this task doesnt copy JSP files properly.
> 
> <target name="deployJSPfiles">
>   <copy todir="${tomcat.home}/webapps/iaks">
>       <fileset dir="${webapp.root}" includes="*.jsp">
>           <include name="*.jsp"/>
>       </fileset>
>   </copy>
> </target>
> 
> Sometimes there is a new JSP file in ${webapp.root}/tiles which doesnt exist
> in ${tomcat.home}/webapps/iaks/tiles,
> however the task doesnt copy the file.
> 
> could someone help me ?
> 
> Maris Orbidans
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: Problem with fileset [was : Ant book review in JavaPro July 2003]

Posted by Antoine Levy-Lambert <an...@antbuild.com>.
try this
with ** in the include pattern, the ${webapp.root} and its subdirs will be
scanned
<target name="deployJSPfiles">
    <copy todir="${tomcat.home}/webapps/iaks">
        <fileset dir="${webapp.root}" >
            <include name="**/*.jsp"/>
        </fileset>
    </copy>
</target>

----- Original Message -----
From: "Maris Orbidans" <M....@datapro.lv>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Tuesday, July 01, 2003 4:08 PM
Subject: RE: Ant book review in JavaPro July 2003



Hello

I created a task to deploy JSP files, however it's not working as I expect.

If I use <fileset> with <include> or <exclude> tag, than sometimes files
aren't copied.

For example, this task doesnt copy JSP files properly.

<target name="deployJSPfiles">
    <copy todir="${tomcat.home}/webapps/iaks">
        <fileset dir="${webapp.root}" includes="*.jsp">
            <include name="*.jsp"/>
        </fileset>
    </copy>
</target>

Sometimes there is a new JSP file in ${webapp.root}/tiles which doesnt exist
in ${tomcat.home}/webapps/iaks/tiles,
however the task doesnt copy the file.

could someone help me ?

Maris Orbidans



---------------------------------------------------------------------
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