protected function getBuildTargets($importFile)
    {

        $targets = array();

        // Replace tokens.
        if (preg_match_all('/\$\{(.*?)\}/s', $importFile, $matches)) {
            foreach ($matches[0] as $key => $match) {
                $tokenText  = $this->getProject()->getProperty(
                    $matches[1][$key]
                );
                $importFile = str_replace($match, $tokenText, $importFile);
            }
        }

        $importFileXml = simplexml_load_file($importFile);

        foreach ($importFileXml->xpath('//target') as $target) {
            $targetName        = (string) $target->attributes()->name;
            $targetVisibility  = (string) $target->attributes()->hidden == 'true' ? 'hidden' : 'visible';
            $targetDescription = (string) $target->attributes()->description;

            $targets[$importFile][] = array(
                'name'        => $targetName,
                'visibility'  => $targetVisibility,
                'description' => $targetDescription,
            );
        }

        return $targets;

    }