You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Yaakov Chaikin <ya...@gmail.com> on 2005/06/19 20:19:23 UTC

What's wrong with this script?

Hi,

I've been using ANT for a long time, but I guess, I am kind of rusty
on creating the scripts themselves.

Here is a simple script. All it does is copy a directory structure to
another directory. For some reason, I get all the directories PLUS
another directory called {tomcat.dir.deploy} (that's its literal
name). That directory has inside of it once again the entire directory
structure I want to copy plus yet another directory
{tomcat.dir.deploy}. This keeps going about 3 levels down, until
finally there is only the directories I wanted to copy without the
{tomcat.dir.deploy} directory.

Could someone point out to me what I am doing wrong?

Here is the build.xml I am using. It sits
<project name="deployDemo" default="deploy" basedir=".">
<property name="tomcat.dir.deploy"
location="C:/tomcat/jakarta-tomcat-5.5.9/webapps" />
<property name="app.name" value="deployDemo"/>
<target name="deploy">
<copy todir="${tomcat.dir.deploy}/${app.name}">
<fileset dir="${basedir}">
<include name="**"/>
<exclude name="build.xml" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${tomcat.dir.deploy}/${app.name}" />
</target>
</project>

Thanks,
Yaakov.

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


Re: What's wrong with this script?

Posted by Bijo Alex Thomas <bi...@dsrc.co.in>.
Use
<include name="*/**"/>
instead of
<include name="**"/>

Regards,
Bijo

_________________________________
Bijo Alex Thomas
DSRC, 6, Smith Road, Chennai - 2
Mail: bijoalex@dsrc.co.in
Website: http://dsrc.com


----- Original Message ----- 
From: "Yaakov Chaikin" <ya...@gmail.com>
To: "Ant User" <us...@ant.apache.org>
Sent: Sunday, June 19, 2005 11:49 PM
Subject: What's wrong with this script?


Hi,

I've been using ANT for a long time, but I guess, I am kind of rusty
on creating the scripts themselves.

Here is a simple script. All it does is copy a directory structure to
another directory. For some reason, I get all the directories PLUS
another directory called {tomcat.dir.deploy} (that's its literal
name). That directory has inside of it once again the entire directory
structure I want to copy plus yet another directory
{tomcat.dir.deploy}. This keeps going about 3 levels down, until
finally there is only the directories I wanted to copy without the
{tomcat.dir.deploy} directory.

Could someone point out to me what I am doing wrong?

Here is the build.xml I am using. It sits
<project name="deployDemo" default="deploy" basedir=".">
<property name="tomcat.dir.deploy"
location="C:/tomcat/jakarta-tomcat-5.5.9/webapps" />
<property name="app.name" value="deployDemo"/>
<target name="deploy">
<copy todir="${tomcat.dir.deploy}/${app.name}">
<fileset dir="${basedir}">
<include name="**"/>
<exclude name="build.xml" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${tomcat.dir.deploy}/${app.name}" />
</target>
</project>

Thanks,
Yaakov.

---------------------------------------------------------------------
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: What's wrong with this script?

Posted by Yaakov Chaikin <ya...@gmail.com>.
That's the thing... Tomcat is not running at all.

Also, the files I am trying to copy to the tomcat/webapps directory
are under a completely different directory which has nothing to do
with Tomcat.

I just don't get why ANT is creating a directory called
"{tomcat.dir.deploy}". I even tried hardcoding all the paths and
removing the property tomcat.dir.deploy, and it still creates that
directory.

Any ideas?

Thanks,
Yaakov.

On 6/19/05, S I <xi...@hotmail.com> wrote:
> Looks like you have indicated to start at the ${basedir} and to include "**"
> everything from the base.dir and since the active files under webapps are
> held hostage by Tomcat (running), it will most definitely complain trying to
> copy locked files but if that's actually your intention, you have to stop
> Tomcat 1st.  Change it to "**/*" or "**/**/**" Something like that. Play
> around with the path.
> 
> ----Original Message Follows----
> From: Yaakov Chaikin <ya...@gmail.com>
> Reply-To: Yaakov Chaikin <ya...@gmail.com>
> To: Ant User <us...@ant.apache.org>
> Subject: What's wrong with this script?
> Date: Sun, 19 Jun 2005 14:19:23 -0400
> MIME-Version: 1.0
> Received: from mail.apache.org ([209.237.227.199]) by mc7-f42.hotmail.com
> with Microsoft SMTPSVC(6.0.3790.211); Sun, 19 Jun 2005 11:19:49 -0700
> Received: (qmail 95045 invoked by uid 500); 19 Jun 2005 18:19:44 -0000
> Received: (qmail 95023 invoked by uid 99); 19 Jun 2005 18:19:44 -0000
> Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)    by
> apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jun 2005 11:19:41 -0700
> Received: pass (asf.osuosl.org: domain of yaakov.chaikin@gmail.com
> designates 64.233.162.206 as permitted sender)
> Received: from [64.233.162.206] (HELO zproxy.gmail.com) (64.233.162.206)
> by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jun 2005 11:19:18 -0700
> Received: by zproxy.gmail.com with SMTP id 9so643502nzo        for
> <us...@ant.apache.org>; Sun, 19 Jun 2005 11:19:23 -0700 (PDT)
> Received: by 10.36.90.8 with SMTP id n8mr2575713nzb;        Sun, 19 Jun 2005
> 11:19:23 -0700 (PDT)
> Received: by 10.36.50.8 with HTTP; Sun, 19 Jun 2005 11:19:23 -0700 (PDT)
> X-Message-Info: JGTYoYF78jGGqB6H9D3GYFpS39cOb/lASw+lixU4KAo=
> Mailing-List: contact user-help@ant.apache.org; run by ezmlm
> Precedence: bulk
> List-Unsubscribe: <ma...@ant.apache.org>
> List-Help: <ma...@ant.apache.org>
> List-Post: <ma...@ant.apache.org>
> List-Id: "Ant Users List" <user.ant.apache.org>
> Delivered-To: mailing list user@ant.apache.org
> X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=RCVD_BY_IP
> X-Spam-Check-By: apache.org
> X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=RCVD_BY_IP
> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;        s=beta; d=gmail.com;
> 
> h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
> 
> b=gqdaG1DAS9doLo2/Oq9mbNAa8Np75CuMedB2z1/jHHBarwvjjD8Ct6EnUfvVLbUcRwTsxa/qFr8v77sP2dGR/gEh2i+blGu7vvCNl1kOzqp7HuNGhI6D41Fdxx0r2JK44EDgF58Y+O9dlAPMqCAqpqXyLi9A6X/uQShdVzzR2rU=
> X-Old-Spam-Check-By: apache.org
> Return-Path: user-return-50728-xiamak=hotmail.com@ant.apache.org
> X-OriginalArrivalTime: 19 Jun 2005 18:19:49.0183 (UTC)
> FILETIME=[7A907CF0:01C574FB]
> 
> Hi,
> 
> I've been using ANT for a long time, but I guess, I am kind of rusty
> on creating the scripts themselves.
> 
> Here is a simple script. All it does is copy a directory structure to
> another directory. For some reason, I get all the directories PLUS
> another directory called {tomcat.dir.deploy} (that's its literal
> name). That directory has inside of it once again the entire directory
> structure I want to copy plus yet another directory
> {tomcat.dir.deploy}. This keeps going about 3 levels down, until
> finally there is only the directories I wanted to copy without the
> {tomcat.dir.deploy} directory.
> 
> Could someone point out to me what I am doing wrong?
> 
> Here is the build.xml I am using. It sits
> <project name="deployDemo" default="deploy" basedir=".">
> <property name="tomcat.dir.deploy"
> location="C:/tomcat/jakarta-tomcat-5.5.9/webapps" />
> <property name="app.name" value="deployDemo"/>
> <target name="deploy">
> <copy todir="${tomcat.dir.deploy}/${app.name}">
> <fileset dir="${basedir}">
> <include name="**"/>
> <exclude name="build.xml" />
> </fileset>
> </copy>
> </target>
> <target name="clean">
> <delete dir="${tomcat.dir.deploy}/${app.name}" />
> </target>
> </project>
> 
> Thanks,
> Yaakov.
> 
> ---------------------------------------------------------------------
> 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: What's wrong with this script?

Posted by S I <xi...@hotmail.com>.
Looks like you have indicated to start at the ${basedir} and to include "**" 
everything from the base.dir and since the active files under webapps are 
held hostage by Tomcat (running), it will most definitely complain trying to 
copy locked files but if that's actually your intention, you have to stop 
Tomcat 1st.  Change it to "**/*" or "**/**/**" Something like that. Play 
around with the path.

----Original Message Follows----
From: Yaakov Chaikin <ya...@gmail.com>
Reply-To: Yaakov Chaikin <ya...@gmail.com>
To: Ant User <us...@ant.apache.org>
Subject: What's wrong with this script?
Date: Sun, 19 Jun 2005 14:19:23 -0400
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc7-f42.hotmail.com 
with Microsoft SMTPSVC(6.0.3790.211); Sun, 19 Jun 2005 11:19:49 -0700
Received: (qmail 95045 invoked by uid 500); 19 Jun 2005 18:19:44 -0000
Received: (qmail 95023 invoked by uid 99); 19 Jun 2005 18:19:44 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)    by 
apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jun 2005 11:19:41 -0700
Received: pass (asf.osuosl.org: domain of yaakov.chaikin@gmail.com 
designates 64.233.162.206 as permitted sender)
Received: from [64.233.162.206] (HELO zproxy.gmail.com) (64.233.162.206)    
by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Jun 2005 11:19:18 -0700
Received: by zproxy.gmail.com with SMTP id 9so643502nzo        for 
<us...@ant.apache.org>; Sun, 19 Jun 2005 11:19:23 -0700 (PDT)
Received: by 10.36.90.8 with SMTP id n8mr2575713nzb;        Sun, 19 Jun 2005 
11:19:23 -0700 (PDT)
Received: by 10.36.50.8 with HTTP; Sun, 19 Jun 2005 11:19:23 -0700 (PDT)
X-Message-Info: JGTYoYF78jGGqB6H9D3GYFpS39cOb/lASw+lixU4KAo=
Mailing-List: contact user-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <ma...@ant.apache.org>
List-Help: <ma...@ant.apache.org>
List-Post: <ma...@ant.apache.org>
List-Id: "Ant Users List" <user.ant.apache.org>
Delivered-To: mailing list user@ant.apache.org
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=RCVD_BY_IP
X-Spam-Check-By: apache.org
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=RCVD_BY_IP
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;        s=beta; d=gmail.com; 
        
h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; 
        
b=gqdaG1DAS9doLo2/Oq9mbNAa8Np75CuMedB2z1/jHHBarwvjjD8Ct6EnUfvVLbUcRwTsxa/qFr8v77sP2dGR/gEh2i+blGu7vvCNl1kOzqp7HuNGhI6D41Fdxx0r2JK44EDgF58Y+O9dlAPMqCAqpqXyLi9A6X/uQShdVzzR2rU=
X-Old-Spam-Check-By: apache.org
Return-Path: user-return-50728-xiamak=hotmail.com@ant.apache.org
X-OriginalArrivalTime: 19 Jun 2005 18:19:49.0183 (UTC) 
FILETIME=[7A907CF0:01C574FB]

Hi,

I've been using ANT for a long time, but I guess, I am kind of rusty
on creating the scripts themselves.

Here is a simple script. All it does is copy a directory structure to
another directory. For some reason, I get all the directories PLUS
another directory called {tomcat.dir.deploy} (that's its literal
name). That directory has inside of it once again the entire directory
structure I want to copy plus yet another directory
{tomcat.dir.deploy}. This keeps going about 3 levels down, until
finally there is only the directories I wanted to copy without the
{tomcat.dir.deploy} directory.

Could someone point out to me what I am doing wrong?

Here is the build.xml I am using. It sits
<project name="deployDemo" default="deploy" basedir=".">
<property name="tomcat.dir.deploy"
location="C:/tomcat/jakarta-tomcat-5.5.9/webapps" />
<property name="app.name" value="deployDemo"/>
<target name="deploy">
<copy todir="${tomcat.dir.deploy}/${app.name}">
<fileset dir="${basedir}">
<include name="**"/>
<exclude name="build.xml" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${tomcat.dir.deploy}/${app.name}" />
</target>
</project>

Thanks,
Yaakov.

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