Modify

Ticket #586 (new defect)

Opened 19 months ago

Last modified 4 months ago

includePath using project.basedir is failing under certain conditions

Reported by: matt@… Owned by: mrook
Priority: major Milestone: 2.5.0
Component: phing-tasks-system Version: 2.4.1
Keywords: Cc:

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 <includepath classpath="${project.basedir}/foo"/> 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

Attachments

Change History

comment:1 Changed 19 months ago by matt@…

I made a mistake in my build.xml file that seems to have caused it.

With a little more examination, I noticed that basedir="." was set in the <project> element. And as expected, it overrode the project.basedir propery's default value.

Removing that solved the problem.

What I can't figure out, though, is why some of the paths resolved to the CWD for where I ran phing, and others to the basedir of build.xml. Again, though, that may be my fault. I have been using phing on dozens of projects with great success. And I think I've written about a dozen custom tasks. They're simple to create, and prove very useful.

The spam blocker is blocking me from submitting this, so I am adding a few lines of text to get it under the threshold for marking this as an invalid comment. You can safely ignore this text.

comment:2 Changed 15 months ago by mrook

  • Milestone changed from 2.4.5 to TBD

comment:3 Changed 4 months ago by mrook

  • Milestone changed from TBD to 2.5.0
View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.