[ https://issues.apache.org/jira/browse/MJAVADOC-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17957643#comment-17957643 ]
Olivier Lamy commented on MJAVADOC-195: --------------------------------------- This project has moved from Jira to GitHub Issues. This issue was migrated to [apache/maven-javadoc-plugin#966|https://github.com/apache/maven-javadoc-plugin/issues/966]. > javadoc generation on @Test(expected...) throws Exception (aggregation issue) > ----------------------------------------------------------------------------- > > Key: MJAVADOC-195 > URL: https://issues.apache.org/jira/browse/MJAVADOC-195 > Project: Maven Javadoc Plugin (Moved to GitHub Issues) > Issue Type: Bug > Affects Versions: 2.3 > Environment: 1.5.x > Reporter: Quinten Verheyen > Priority: Major > > In a recent build of ours, running javadoc:javadoc on our modules gave the > following exception : > [INFO] An error has occurred in JavaDocs report generation:Exit code: 1 - > javadoc: error - In doclet class com.sun.tools.doclets.standard.Standard, > method start has thrown an exception > java.lang.reflect.InvocationTargetException > java.lang.AssertionError: cannot find method org.junit.Test.expected() > at > com.sun.tools.javac.jvm.ClassReader$AnnotationDeproxy.findAccessMethod(ClassReader.java:1074) > It took me some time to find out that this ONLY fails when the test is part > of a module which is more then 1 level deeper then the module from wich the > javadoc command is being run. > To illustrate, the usage of @Test(expected=...) occured in several of our > modules, one of them was directly below the root and a couple of others an > extra level down. When I temporarily commented out the modules who were an > extra level down, the javadoc generation succeeded, despite that fact there > were still tests using @Test(expected=...). > Below the configuration in our root pom.xml : > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-javadoc-plugin</artifactId> > <version>2.3</version> > <configuration> > <aggregate>true</aggregate> > <links> > <link>http://java.sun.com/j2se/1.5.0/docs/api</link> > > <link>http://static.springframework.org/spring/docs/2.0.x/api</link> > </links> > </configuration> > </plugin> -- This message was sent by Atlassian Jira (v8.20.10#820010)