Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.6
-
Fix Version/s: 2.6.1
-
Labels:None
-
Environment:Mac OS X 10.5.7
-
Number of attachments :1
Description
The plugin is ignoring my directory src/main/javadoc/resources
I want to put in background images for my stylesheet to use, and I want to overwite inherit.gif (to one with a transparent background, a Java problem since I started with Java back before 1.0, sigh). So I put a bg.gif and a new inherit.gif in src/main/javadoc/resources. It is not copied. I do have <docfilessubdirs> set to true.
I have attached a subset of my project that demonstrates the problem. Unzip and then run mvn javadoc:javadoc. If you look at target/site/apidocs/resources, the file contains only one file, while src/main/javadoc/resources contains three.
-
Hide
- jd.zip
- 04/Sep/09 11:38 AM
- 990 kB
- Ken Arnold
-
- pom.xml 8 kB
- src/main/javadoc/resources/bg.jpg 92 kB
- src/main/javadoc/resources/bg.psd 1.81 MB
- src/main/javadoc/resources/inherit.gif 28 kB
- src/main/javadoc/stylesheet.css 1 kB
- src/main/java/org/.../args/.svn/entries 1 kB
- src/main/.../MainArgs.java.svn-base 0.0 kB
- src/main/.../HelpOnlyException.java.svn-base 0.5 kB
- src/main/.../MainArgs.java.svn-base 55 kB
- src/main/.../MissingDirAction.java.svn-base 0.4 kB
- src/main/.../text-base/package.html.svn-base 0.1 kB
- src/.../ProgramOptionException.java.svn-base 1 kB
- src/main/.../args/HelpOnlyException.java 0.5 kB
- src/main/java/.../simplx/args/MainArgs.java 55 kB
- src/main/java/.../args/MissingDirAction.java 0.4 kB
- src/main/java/.../simplx/args/package.html 0.1 kB
- src/main/.../ProgramOptionException.java 1 kB
- src/doc/.svn/entries 0.4 kB
- src/doc/.../stylesheet.css.svn-base 1 kB
- src/doc/javadoc-packages/.svn/entries 0.3 kB
- src/doc/.../.svn/dir-prop-base 0.0 kB
- src/doc/javadoc-packages/.../.svn/entries 0.4 kB
- src/doc/.../text-base/package-list.svn-base 3 kB
- src/doc/.../jdk-1.5.0/package-list 3 kB
- src/doc/javadoc-packages/.../.svn/entries 0.3 kB
- src/doc/.../text-base/package-list.svn-base 0.1 kB
- src/doc/.../jdom-1.1/package-list 0.1 kB
- src/doc/javadoc-packages/.../.svn/entries 0.3 kB
- src/doc/.../text-base/package-list.svn-base 0.2 kB
- src/doc/.../junit-4.5/package-list 0.2 kB
Activity
It looks like this is not really fixed after all. I just tried generating javadocs for the attached project with both version 2.6.1 and 2.8, and the files are not copied:
[cvh: jd]$ mvn -version Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: /home/cvh/Apps/apache-maven-3.0.3 Java version: 1.6.0_20, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_DK, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-31-generic-pae", arch: "i386", family: "unix" [cvh: jd]$ mvn javadoc:javadoc -Dquiet [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.simplx:simplx:jar:0.8.4 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> duplicate declaration of version 4.5 @ line 49, column 21 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> duplicate declaration of version 4.5 @ line 54, column 21 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-io:commons-io:jar -> duplicate declaration of version 1.4 @ line 59, column 21 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> duplicate declaration of version 4.5 @ line 64, column 21 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: junit:junit:jar -> duplicate declaration of version 4.5 @ line 74, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-idea-plugin is missing. @ line 119, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 127, column 21 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 140, column 21 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ line 182, column 21 [WARNING] 'reporting.plugins.plugin.version' for org.codehaus.mojo:cobertura-maven-plugin is missing. @ line 186, column 21 [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-project-info-reports-plugin is missing. @ line 190, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building simplx 0.8.4 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-javadoc-plugin:2.8:javadoc (default-cli) @ simplx >>> [INFO] [INFO] <<< maven-javadoc-plugin:2.8:javadoc (default-cli) @ simplx <<< [INFO] [INFO] --- maven-javadoc-plugin:2.8:javadoc (default-cli) @ simplx --- [WARNING] Source files encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.932s [INFO] Finished at: Mon May 16 15:24:47 CEST 2011 [INFO] Final Memory: 8M/94M [INFO] ------------------------------------------------------------------------ [cvh: jd]$ ls target/site/apidocs/resources/ inherit.gif [cvh: jd]$ ls src/main/javadoc/resources/ bg.jpg bg.psd inherit.gif [cvh: jd]$
After a little more experimentation – the plugin seems only to be looking for files that might otherwise live in the java source tree – overview.html et al, and doc-files dirs. This seems overly restrictive – the reason for the doc-files subdir in a well-formed java source tree is to avoid intermixing the java source and doc files. By separating them out into a javadoc tree, you have already gotten away from this problem.
However, this still leaves me stymied without a way to add overall resources to the javadoc run, and especially without a way to override anything but the stylesheet (which is handled as a special case). I can work around my background image problem by putting it in a top-level doc-files dir, but I can't override inherit.gif that way. I should be able to set the resources dir. (Imagine, for example, a doclet that needed its own resource comparable to inherit.gif – where could it put it, how could it be supported in the plugin?)