Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.3
-
Fix Version/s: 2.5
-
Labels:None
-
Number of attachments :
Description
Using
mvn clean javadoc:test-javadoc
it could produce unsuccessful build or warning (depending the javadoc version used, i.e 1.4 vs 1.5)
The options file contains:
-classpath '[SNIP]/target/classes;[SNIP]/target/tests-classes;...'
The explanation is that no target\classes was created before executing test-javadoc
Issue Links
- relates to
-
MJAVADOC-168
Regression: 2.4-SNAPSHOT does not generate docs for generates sources if run outside a build
-
Well, why to depend on the compiled classes of the project anyway? Regarding the currently build project, you have something better than just bytecode, the sources! Unlike the class files, the sources carry documentation that javadoc can use to inherit documentation (e.g. for overriden methods). So, instead of
I would rather aim at
However, just including the project main sources on the source path has an unwanted effect: One will likely get Javadoc for production classes if those happen to reside in the same package as some test class (a common scenario for organizing tests). This effect stems from the fact, that the plugin currently specifies which packages to document and javadoc cannot distinguish from main and test sources. But that is easily solved: Instead of listing up packages, the plugin simply needs to scan all test source directories for Java files and put those in an arg file.