[ http://jira.codehaus.org/browse/MJAVADOC-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99699 ]
Adam Hardy commented on MJAVADOC-106: ------------------------------------- I am trying to run javadoc on the tests in my src/test/java directory, and I find that maven-javadoc-plugin is excluding the dependencies with scope 'test'. This unleashes a whole stream of nasty exceptions such as: java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl These nasty exceptions seem to stem from a bug in javadoc itself: [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6442982] so the exceptions will not appear for everyone. Javadoc may complete, but I suspect it will leave unsatisfied links to 'test' dependencies. I then changed the scope on the required dependencies to 'provided' and maven-javadoc-plugin now does include the dependency in the classpath passed to javadoc - contrary to what Christophe is experiencing. I am using JDK 1.5.0_12, mvn 2.0.6, maven-javadoc-plugin 2.3-20070314.204553-2 It seems that maven-javadoc-plugin is currently suitable only for running javadoc on the main code, rather than any other source folders such as test. I can of course include the src/test/java directory in the config with <sourcepath> tags, but the javadoc will not be correct, if it completes at all. As a work-around I can specify scope 'provided'. I am currently looking into another issue I have with the plugin, so when I am convinced that it too is a bug, I would be happy to put together a quick test project. Best regards > Dependencies with scope "runtime" or "provided" are not used in the javadoc > classpath > ------------------------------------------------------------------------------------- > > Key: MJAVADOC-106 > URL: http://jira.codehaus.org/browse/MJAVADOC-106 > Project: Maven 2.x Javadoc Plugin > Issue Type: Bug > Affects Versions: 2.1 > Reporter: Christophe DENEUX > > Hi, > I have a class inherited from an hibernate class. So my project contains a > dependency onto Hibernate with the default scope, and an other dependencies > needed by Hibernate with scope=runtime and/or provided. > My javadoc plugin is configured to use the doclet Umlgraph. > At the report generation I have an error telling that classes are not found. > These classes are contained in dependencies with scope=runtime/provided. If I > change the scope to compile, that works fine. > After investigation in the source code, it seems to me that only dependencies > with scope=compile are used. > Can you take into account dependencies with scope=runtime/provided, or > propose configuration parameters to set these artifacts. > Christophe DENEUX > Capgemini Sud - France - Nice -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira