public function getBasedir()
    {
        if ($this->basedir === null) {
            try { // try to set it
                $this->setBasedir(".");
            } catch (BuildException $exc) {
                throw new BuildException("Can not set default basedir. " . $exc->getMessage());
            }
        }

        return $this->basedir;
    }