Thanks Jan,

I check out the project to 2 different locations. Hence the build file
resides in 2 different locations. yet, the basedir is the same in both
locations. This results in a failed build in one location.



On Thu, Apr 18, 2013 at 8:15 AM, Jan Matèrne (jhm) <apa...@materne.de>wrote:

> The "." in the basedir attribute is relative to the buildfile itself, not
> the current directory.
> You could access that via ${user.dir} :
>
> <project basedir=".">
>     <echo>BaseDir: ${basedir}</echo>
>     <echo>UserDir: ${user.dir}</echo>
> </project>
>
> You can't set that value as basedir because at the time when basedir is
> set,
> the system properties aren't populates as Ant properties.
> (Also I would not do that because can't be sure from where a user is
> calling
> the buildfile with strange site effects ... think of a "ant clean" in your
> home dir?)
>
>
> Jan
>
> > -----Ursprüngliche Nachricht-----
> > Von: Michael Niemand [mailto:michael.niem...@gmail.com]
> > Gesendet: Mittwoch, 17. April 2013 16:12
> > An: user@ant.apache.org
> > Betreff: basedir setting not working?
> >
> > Hi folks,
> >
> > my basedir setting doesnt seem to work.
> >
> > I have the same project I check out to two different locations.
> >
> > in the second project the basedir setting doesnt seem to work.
> >
> > Here's what I do:
> >
> > <!-- <project name="ClientKapselTest" default="targets" basedir="./">
> > also tried that --> <project name="ClientKapselTest" default="targets"
> > >
> >
> > <!-- ==================== Initialization properties
> > =====================
> > -->
> > <echo message="*** what's considered basedir before setting it:
> > ${basedir}"
> > />
> > <property name="basedir" value="."/>
> > <echo message="*** what's considered basedir after setting it:
> > ${basedir}"
> > />
> >
> > </project>
> >
> > The result is always:
> >
> >      [echo] *** what's considered basedir before setting it:
> > M:\path\to\A
> >      [echo] *** what's considered basedir after setting it:
> > M:\path\to\A
> >
> >
> > even though I execute the ant-skript in M:\path\to\B
> >
> >
> > I thought basedir is always the path where the build.xml itself
> > resides?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>
>


-- 
Dipl.-Ing. (FH) *Michael Niemand**
*
Albusstr. 17
60313 Frankfurt/M
Germany

Tel.: +49 (0) 69 200 130 60
Mobile: +49 (0) 171 645 29 07

eMail: michael.niem...@gmail.com
sip:1406...@sipgate.de

Reply via email to