You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by IndianAtTech <in...@gmail.com> on 2004/12/17 06:48:01 UTC

Question Title: ANT -->> Directory access problem

 Hi All,

I know the following is valid syntax and also works fine in my case.


<project name="MyProject" default="dist" basedir=".">
    <description>
        simple example build file
    </description>
</project>


But i have different scenario.
Say I have a project called in MyProect in root direectory and it
contains sub directory called MyTest, something like
c:/MyProject/MyTest

and also it contains c:/MyProject/src

now placing my build.xml in c:/MyProject/MyTest foloder I wanted to
compile tje files of c:/MyProject/src

By giving explicitly the value of basedir as /MyProject, I can make
build.xml to work.

But I wanted to access the value of /MyProject/src dynamically.

I have tried basedir"./" and basedir="/./" both doesnot work.

So, Please let me know other solutions, if it is possible

Thanks
sudhakar

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


Re: Question Title: ANT -->> Directory access problem

Posted by Martin Gainty <mg...@hotmail.com>.
Since the build.xml is reaching for files in src and compiling to 
classes..jarring to dist
it would really make more sense to locate build.xml in root
(the ../ will get confusing after awhile)
~Just my 2 pennies~

Martin Gainty

(mobile) 617-852-7822




>From: Phil Weighill-Smith <ph...@volantis.com>
>Reply-To: "Ant Developers List" <de...@ant.apache.org>
>To: IndianAtTech <in...@gmail.com>
>CC: dev@ant.apache.org, user@ant.apache.org
>Subject: Re: Question Title: ANT -->> Directory access problem
>Date: Fri, 17 Dec 2004 09:28:53 +0000
>MIME-Version: 1.0
>Received: from mail.apache.org ([209.237.227.199]) by mc6-f4.hotmail.com 
>with Microsoft SMTPSVC(5.0.2195.6713); Fri, 17 Dec 2004 01:31:16 -0800
>Received: (qmail 98882 invoked by uid 500); 17 Dec 2004 09:31:14 -0000
>Received: (qmail 98853 invoked by uid 99); 17 Dec 2004 09:31:14 -0000
>Received: pass (hermes.apache.org: local policy)
>Received: from smtp.volantis.com (HELO mail.volantis.com) (213.86.197.2)  
>by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 17 Dec 2004 01:29:28 -0800
>Received: squid 10.20.30.27 from 10.20.30.23 10.20.30.23 via HTTP with 
>MS-WebStorage 6.0.6249
>Received: from sparrow.uk.volantis.com by squid; 17 Dec 2004 09:28:53 +0000
>X-Message-Info: JGTYoYF78jGMU70MuHhLYCpy6iUm0blc
>Mailing-List: contact dev-help@ant.apache.org; run by ezmlm
>Precedence: bulk
>List-Unsubscribe: <ma...@ant.apache.org>
>List-Subscribe: <ma...@ant.apache.org>
>List-Help: <ma...@ant.apache.org>
>List-Post: <ma...@ant.apache.org>
>List-Id: "Ant Developers List" <dev.ant.apache.org>
>Delivered-To: mailing list dev@ant.apache.org
>X-ASF-Spam-Status: No, hits=0.1 required=10.0tests=HTML_30_40,HTML_MESSAGE
>X-Spam-Check-By: apache.org
>References: <62...@mail.gmail.com>
>Organization: Volantis Systems
>X-Mailer: Ximian Evolution 1.4.6 X-Virus-Checked: Checked
>Return-Path: dev-return-62413-mgainty=hotmail.com@ant.apache.org
>X-OriginalArrivalTime: 17 Dec 2004 09:31:16.0825 (UTC) 
>FILETIME=[2884AC90:01C4E41B]
>
>Don't specify basedir in the sub-project build.xml and invoke it via
><ant/> from a build.xml in the c:\MyProject directory (with basedir
>"."): the sub-project will inherit the main project's basedir (i.e.
>c:\MyProject). Alternatively, access your source directory via ../src
>(which seems a bit duff, but workable). Finally, look at the <ant/> and
><subant/> tasks' documentation.
>
>Phil :n.
>
>On Fri, 2004-12-17 at 05:48, IndianAtTech wrote:
>
> >  Hi All,
> >
> > I know the following is valid syntax and also works fine in my case.
> >
> >
> > <project name="MyProject" default="dist" basedir=".">
> >     <description>
> >         simple example build file
> >     </description>
> > </project>
> >
> >
> > But i have different scenario.
> > Say I have a project called in MyProect in root direectory and it
> > contains sub directory called MyTest, something like
> > c:/MyProject/MyTest
> >
> > and also it contains c:/MyProject/src
> >
> > now placing my build.xml in c:/MyProject/MyTest foloder I wanted to
> > compile tje files of c:/MyProject/src
> >
> > By giving explicitly the value of basedir as /MyProject, I can make
> > build.xml to work.
> >
> > But I wanted to access the value of /MyProject/src dynamically.
> >
> > I have tried basedir"./" and basedir="/./" both doesnot work.
> >
> > So, Please let me know other solutions, if it is possible
> >
> > Thanks
> > sudhakar
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
>
>--
>Phil Weighill-Smith <ph...@volantis.com>
>Volantis Systems



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


Re: Question Title: ANT -->> Directory access problem

Posted by Phil Weighill-Smith <ph...@volantis.com>.
Don't specify basedir in the sub-project build.xml and invoke it via
<ant/> from a build.xml in the c:\MyProject directory (with basedir
"."): the sub-project will inherit the main project's basedir (i.e.
c:\MyProject). Alternatively, access your source directory via ../src
(which seems a bit duff, but workable). Finally, look at the <ant/> and
<subant/> tasks' documentation.

Phil :n.

On Fri, 2004-12-17 at 05:48, IndianAtTech wrote:

>  Hi All,
> 
> I know the following is valid syntax and also works fine in my case.
> 
> 
> <project name="MyProject" default="dist" basedir=".">
>     <description>
>         simple example build file
>     </description>
> </project>
> 
> 
> But i have different scenario.
> Say I have a project called in MyProect in root direectory and it
> contains sub directory called MyTest, something like
> c:/MyProject/MyTest
> 
> and also it contains c:/MyProject/src
> 
> now placing my build.xml in c:/MyProject/MyTest foloder I wanted to
> compile tje files of c:/MyProject/src
> 
> By giving explicitly the value of basedir as /MyProject, I can make
> build.xml to work.
> 
> But I wanted to access the value of /MyProject/src dynamically.
> 
> I have tried basedir"./" and basedir="/./" both doesnot work.
> 
> So, Please let me know other solutions, if it is possible
> 
> Thanks
> sudhakar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

-- 
Phil Weighill-Smith <ph...@volantis.com>
Volantis Systems

Re: Question Title: ANT -->> Directory access problem

Posted by Phil Weighill-Smith <ph...@volantis.com>.
Don't specify basedir in the sub-project build.xml and invoke it via
<ant/> from a build.xml in the c:\MyProject directory (with basedir
"."): the sub-project will inherit the main project's basedir (i.e.
c:\MyProject). Alternatively, access your source directory via ../src
(which seems a bit duff, but workable). Finally, look at the <ant/> and
<subant/> tasks' documentation.

Phil :n.

On Fri, 2004-12-17 at 05:48, IndianAtTech wrote:

>  Hi All,
> 
> I know the following is valid syntax and also works fine in my case.
> 
> 
> <project name="MyProject" default="dist" basedir=".">
>     <description>
>         simple example build file
>     </description>
> </project>
> 
> 
> But i have different scenario.
> Say I have a project called in MyProect in root direectory and it
> contains sub directory called MyTest, something like
> c:/MyProject/MyTest
> 
> and also it contains c:/MyProject/src
> 
> now placing my build.xml in c:/MyProject/MyTest foloder I wanted to
> compile tje files of c:/MyProject/src
> 
> By giving explicitly the value of basedir as /MyProject, I can make
> build.xml to work.
> 
> But I wanted to access the value of /MyProject/src dynamically.
> 
> I have tried basedir"./" and basedir="/./" both doesnot work.
> 
> So, Please let me know other solutions, if it is possible
> 
> Thanks
> sudhakar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

-- 
Phil Weighill-Smith <ph...@volantis.com>
Volantis Systems