tags:

views:

41

answers:

1

I'm having trouble specifying multiple paths to the -sourcepath option of javadoc. I have two trees:

  /hd/c/src/SerialPort/src/main/java/serialPort
  /hd/c/src/drivers/src/main/java/zigbee

The first tree contains a single package, down in:

/hd/c/src/SerialPort/src/main/java/serialPort/SerialPort

The second tree has numerous packages, in:

  /hd/c/src/drivers/src/main/java/zigbee/stack
  /hd/c/src/drivers/src/main/java/zigbee/common
  /hd/c/src/drivers/src/main/java/zigbee/zcl

I can successfully create documents for either tree by saying:

  javadoc -d ./doc/serialPort \
    -sourcepath SerialPort/src/main/java \
    -subpackages serialPort

and

  javadoc -d ./doc/drivers 
    -sourcepath drivers/src/main/java \
    -subpackages zigbee

What I want is to create a single, set of documents for the whole works. It feels to me as if I should be able to say:

  javadoc -d ./doc \
    -sourcepath SerialPort/src/main/java;drivers/src/main/java \
    -subpackages \
      serialPort \
      zigbee

but any attempt to place multiple paths in my -sourcepath results in this message:

  javadoc: error - No packages or classes specified.

Does anyone have any idea what I'm doing wrong?

A: 

I don't know what platform uses /hd/c as a path, but I'm guessing something Unix based - possibly a Mac. In which case, you should be using : as your path separator, not ;

dty
I'm running under Windows XP, using Cygwin. Is that likely to be the problem? I've tried using semi-colons (;) and colons (:) and even commas (,). No joy.
vw-register
Cygwin?! You're on your own, mate! :-) I'd start by trying to get it working with a single path, so you can make sure you've got all the rest of the parameters/setup right, then add the extra path elements in the knowledge that the only thing that can be wrong at that point is the path setup.
dty
I am able to build either set of documents (using the commands shown above). It's only when I try to place two paths on the -sourcepath that I get problems.
vw-register
Oh yeah, you said that. Sorry, I missed it. Hmmm... out of ideas, I'm afraid. Perhaps using subpackages which refer to different source trees is confusing it? But I really am just guessing now. Sorry.
dty
I haven't been able to confirm, from the various on-line documents I've read, whether subpackages in different source trees are supported. Possibly I should be using the -link option instead? But I haven't been able to get that to do what I expect either...
vw-register
I was finally able to confirm that everything worked fine under Linux; it's a problem with Javadoc under Cygwin.
vw-register