如何让GroovyDoc正确记录具有泛型类型参数的返回类型?

时间:2013-04-02 13:09:25

标签: maven ant groovy groovydoc

我有一个ant任务,可以生成我的Maven pom文件中定义的GroovyDoc。除了返回类似这样的方法的方法文档之外,一切看起来都很棒:

    List<WebElement> are documented with List as the return type. The generic type  parameter is totally missing:

    List    getAccountsMenuOptions()

    Gets the list of links that are currently displayed in the account selector menu

    I expected something like this:

    List<WebElement>    getAccountsMenuOptions()

    Gets the list of links that are currently displayed in the account selector menu

这就是我定义任务的方式:

     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.7</version>
        <executions>
           <execution>
              <id>groovydoc</id>
              <phase>package</phase>
              <goals>
                 <goal>run</goal>
              </goals>
              <configuration>
                 <target>
                    <taskdef name="groovydoc"
                     classname="org.codehaus.groovy.ant.Groovydoc" 
                     classpathref="maven.compile.classpath"/>

                    <groovydoc destdir="target/groovydoc"
                     sourcepath="src/main/groovy" use="true"
                     windowtitle="Epiphany"
                     doctitle="Epiphany">

                       <link packages="java.,org.xml.,javax.,org.xml."
                        href="http://download.oracle.com/javase/7/docs/api" />
                       <link packages="org.junit.,junit.framework."
                        href="http://kentbeck.github.com/junit/javadoc/latest" />
                       <link packages="groovy.,org.codehaus.groovy."
                        href="http://groovy.codehaus.org/api/" />
                       <link packages="org.testng."
                        href="http://groovy.codehaus.org/api/" />
                     <link packages="org.openqa.selenium."
                     href="http://selenium.googlecode.com/svn/trunk/docs/api/java/" /> 
                   </groovydoc>
                 </target>
              </configuration>
           </execution>
        </executions>
     </plugin>

0 个答案:

没有答案