0

I'm trying to get Netbeans for Mac to integrate with DocBlox for documentation generation. I followed the instructions on the docblox site for integrating with netbeans, but when I actually try to generate documentation I get no output, and the following appears in the output window:

DocBlox version 0.17.2

PHP Warning:  mkdir(): Permission denied in /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php on line 120

PHP Stack trace:
PHP   1. {main}() /usr/local/php5-20111115-115202/bin/docblox:0
PHP   2. DocBlox_Task_Project_Run->execute() /usr/local/php5-20111115-115202/bin/docblox:55
PHP   3. DocBlox_Task_Project_Parse->execute() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Run.php:141
PHP   4. DocBlox_Task_Project_Parse->getTarget() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:270
PHP   5. mkdir() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:120
Warning: mkdir(): Permission denied in /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php on line 120

Call Stack:
    0.0004     655768   1. {main}() /usr/local/php5-20111115-115202/bin/docblox:0
    0.0227    3376320   2. DocBlox_Task_Project_Run->execute() /usr/local/php5-20111115-115202/bin/docblox:55
    0.0246    3538264   3. DocBlox_Task_Project_Parse->execute() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Run.php:141
    0.0546    3867832   4. DocBlox_Task_Project_Parse->getTarget() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:270
    0.0546    3868056   5. mkdir() /usr/local/php5-20111115-115202/lib/php/DocBlox/src/DocBlox/Task/Project/Parse.php:120

ERROR: The given location "Reefknot" is not a folder

DocBlox creates documentation from PHP source files. The simplest way to use it is:

    $ docblox run -d <directory to parse> -t <output directory>

This will parse every file ending with .php, .php3 and .phtml in <directory to parse> and then
output a HTML site containing easily readable documentation in <output directory>.

DocBlox will try to look for a docblox.dist.xml or docblox.xml file in your current working directory
and use that to override the default settings if present. In the configuration file can you specify the
same settings (and more) as the command line provides.

Usage:
 docblox project:run [options]

-h [--help]                   Show this help message
-q [--quiet]                  Silences the output and logging
-c [--config] [STRING]        Configuration filename OR "none", when this option is omitted DocBlox tries to load the docblox.xml or docblox.dist.xml from the current working directory
-f [--filename] STRING        Comma-separated list of files to parse. The wildcards ? and * are supported
-d [--directory] STRING       Comma-separated list of directories to (recursively) parse.
-t [--target] [STRING]        Path where to store the generated output (optional, defaults to "output")
-e [--extensions] [STRING]    Optional comma-separated list of extensions to parse, defaults to php, php3 and phtml
-i [--ignore] [STRING]        Comma-separated list of file(s) and directories that will be ignored. Wildcards * and ? are supported
-m [--markers] [STRING]       Comma-separated list of markers/tags to filter, (optional, defaults to: "TODO,FIXME")
-v [--verbose]                Provides additional information during parsing, usually only needed for debugging purposes
--title [STRING]              Sets the title for this project; default is the DocBlox logo
--template [STRING]           Sets the template to use when generating the output
--force                       Forces a full build of the documentation, does not increment existing documentation
--validate                    Validates every processed file using PHP Lint, costs a lot of performance
--parseprivate                Whether to parse DocBlocks tagged with @internal
--visibility [STRING]         Specifies the parse visibility that should be displayed in the documentation (comma seperated e.g. "public,protected")
--defaultpackagename [STRING] name to use for the default package.  If not specified, uses "default"
--sourcecode                  Whether to include syntax highlighted source code
-p [--progressbar]            Whether to show a progress bar; will automatically quiet logging to stdout

I have chmoded the target directory to 0777, but still no joy.

Has anybody got any ideas what's going wrong here? I'm running OSX Lion, Netbeans 7.1RC2 and DocBlox 0.17.2 installed via PEAR

GordonM
  • 31,179
  • 15
  • 87
  • 129
  • Sorry, forgot to paste it. Fixing now – GordonM Jan 02 '12 at 11:34
  • so, whats a "Reefknot"? The folder does not exists, it says. Show some configuration. Note, that you cannot assume, that DocBlox is called with the project folder as work directory. This means, you should avoid relative paths. – KingCrunch Jan 02 '12 at 11:37
  • Netbeans wont let you specify a relative path, it actually displays a warning if you try to. I suspect that the path specified in netbeans is not being passed to docblox though. Not sure what to do about that. – GordonM Jan 02 '12 at 11:39
  • As for configuration, the only option in netbeans is the path to the PhpDocumentor script. The DocBlox site says just pointing it at the docblox script instead will work. – GordonM Jan 02 '12 at 11:40

1 Answers1

1

Short version
it appears you need to modify the phpdoc batch file of NetBeans as described here: https://github.com/docblox/docblox/issues/195

Explanation
the problem is probably caused by Netbeans passing a title using the shortcut notation (-ti) of phpDocumentor. I am assuming your project is called Reefknot and Netbeans tries to add -ti Reefknot as last argument.

Since DocBlox is unable to handle the double character shortcut notation it will interpret -ti as being -t and as such cause Docblox to try and write to a folder 'Reefknot'.

mvriel
  • 674
  • 6
  • 6