includePath using project.basedir is failing under certain conditions (Trac #586) #537
Description
Summary:
If running phing -f path/to/build.xml myTarget
and using an <includePath>
that uses ${project.basedir}, the wrong path is added.
Details
As I understand it, project.basedir is set to the basedir of the build.xml file. But under some circumstances it seems to be set to the current working directory for part of the build, and to the basedir of the build.xml for the rest of the build.
In particular, when using and then running Phing this way:
$ phing -f ../../build.xml foo
This seems to set ${project.basedir}
to .
during the includpath execution, but then treat substitute the basedir of ${buildxml}
for the rest of the processing.
This seems to me to be a bug... or at least a nuance that should be documented.
Platform:
* phing 2.4.1
* PHP 5.3.3
* Mac OS 10.6
Migrated from https://www.phing.info/trac/ticket/586
{
"status": "new",
"changetime": "2016-10-07T08:28:55",
"description": "Summary:\n\nIf running `phing -f path/to/build.xml myTarget` and using an `<includePath>` that uses ${project.basedir}, the wrong path is added.\n\nDetails\n\nAs I understand it, project.basedir is set to the basedir of the build.xml file. But under some circumstances it seems to be set to the current working directory for part of the build, and to the basedir of the build.xml for the rest of the build.\n\nIn particular, when using <includepath classpath=\"${project.basedir}/foo\"/> and then running Phing this way:\n\n$ phing -f ../../build.xml foo\n\nThis seems to set `${project.basedir}` to `.` during the includpath execution, but then treat substitute the basedir of `${buildxml}` for the rest of the processing.\n\nThis seems to me to be a bug... or at least a nuance that should be documented.\n\nPlatform:\n\n * phing 2.4.1\n * PHP 5.3.3 \n * Mac OS 10.6",
"reporter": "matt@aleph-null.tv",
"cc": "",
"resolution": "",
"_ts": "1475828935569836",
"component": "phing-tasks-system",
"summary": "includePath using project.basedir is failing under certain conditions",
"priority": "major",
"keywords": "",
"version": "2.4.1",
"time": "2010-11-12T22:41:08",
"milestone": "4.0",
"owner": "mrook",
"type": "defect"
}