Maven 1.x Javadoc Plugin
  1. Maven 1.x Javadoc Plugin
  2. MPJAVADOC-2

I would like more control over the packages that javadoc uses to generate online documentation

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Today the javadoc plugin takes the list of packages to be what is in the POM and it then appends ".*" on the end of pom.package.

      In our case we will put "a.b.c" as the package but there are some sub-packages that should not be documented via javadoc. In this case I would like to be able to specify "a.b.c.d,a.b.c.e.f" as the list of packages to document.

      I can suggest 2 possible ways to implement this:

      1) If pom.package has a comma in it then don't add the ".*"

      2) Add a new property for the plugin that overrides the pom.package if, and only if, it exists

      Thanks,

      Julian Payne

        Activity

        Hide
        dion gillard added a comment -

        Patches would help

        Show
        dion gillard added a comment - Patches would help
        Hide
        Ralph Apel added a comment -

        If we define a package as a subdir containing .java files, the following scriptlet may iterate thru their package names:

        <project default="default"
        xmlns:j="jelly:core"
        xmlns:u="jelly:util"
        xmlns:ant="jelly:ant"
        xmlns:maven="jelly:maven">

        <goal name="packages:list">
        <ant:fileScanner var="jfiles">
        <fileset dir="src/java">
        <include name="*/.java" />
        </fileset>
        </ant:fileScanner>
        <j:useList var="pkgdirs" />
        <j:forEach items="$

        {jfiles.iterator()}

        " var="jfile">
        <j:set var="pkgdir" value="$

        {jfile.parentFile.path}

        " />
        <j:if test="$

        {!pkgdirs.contains(pkgdir)}

        " >
        <j:set var="rc" value="$

        {pkgdirs.add(pkgdir)}

        " />
        </j:if>
        </j:forEach>
        <j:set var="rembase" value="$

        {basedir}

        /src/java/" />
        <j:forEach items="$

        {pkgdirs.iterator()}

        " var="pkgd">
        <j:set var="pkgreld" value="$

        {pkgd.substring(rembase.length())}

        " />
        <u:replace var="pkg" value="$

        {pkgreld}

        " oldChar="/" newChar="." />
        <echo>$

        {pkg}

        </echo>
        </j:forEach>
        </goal>

        Show
        Ralph Apel added a comment - If we define a package as a subdir containing .java files, the following scriptlet may iterate thru their package names: <project default="default" xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven"> <goal name="packages:list"> <ant:fileScanner var="jfiles"> <fileset dir="src/java"> <include name="* / .java" /> </fileset> </ant:fileScanner> <j:useList var="pkgdirs" /> <j:forEach items="$ {jfiles.iterator()} " var="jfile"> <j:set var="pkgdir" value="$ {jfile.parentFile.path} " /> <j:if test="$ {!pkgdirs.contains(pkgdir)} " > <j:set var="rc" value="$ {pkgdirs.add(pkgdir)} " /> </j:if> </j:forEach> <j:set var="rembase" value="$ {basedir} /src/java/" /> <j:forEach items="$ {pkgdirs.iterator()} " var="pkgd"> <j:set var="pkgreld" value="$ {pkgd.substring(rembase.length())} " /> <u:replace var="pkg" value="$ {pkgreld} " oldChar="/" newChar="." /> <echo>$ {pkg} </echo> </j:forEach> </goal>
        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Julian Payne
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: