8

I have a Util package with source files in three seperate directories, defined like so:

  • src/com/domain/util
  • src/Standard/com/domain/util
  • src/Extended/com/domain/util

The package is built with the first set of files and either one of the second or third set, to create a total of two different implementations of the same interface.

Now, I want to generate javadoc based on those files. How can I specify that? What I really want to do is

javadoc com.domain.util -sourcepath ./src;./src/Standard

to build the javadoc for the standard util package, and

javadoc com.domain.util -sourcepath ./src;./src/Extended

to build the javadoc for the extended util package. This doesn't work. The only way I've found so far to actually make it work is to merge the directory structure of the common classes and the Standard classes into another location and run with that for the standard javadoc, then do the same for the Extended package. Is there another way?

3 Answers 3

2

I ended up writing a script to copy the two directories into a third temp directory and run the javadoc on that.

Sign up to request clarification or add additional context in comments.

1 Comment

javadoc.exe -d doc -sourcepath src/main/java com.company.thing1 com.company.thing2 -subpackages src/test/java/unittests/*.java
0

Why not build src/Standard and src/Extended separately? Then build com/domain/util using the -link option, referencing first one and then the other.

1 Comment

Classes in src/Standard reference classes in src/ and vice versa, so they have to be built at the same time.
0

Are you using Eclipse? When you use the Jar Export Wizard, you can get it to export an Ant script which you can use from then on.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.