You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Heritier Arnaud <ah...@axway.com> on 2004/07/29 18:05:22 UTC

RE : javadoc plugin and Doc Check Doclet

A similar enhancement is proposed in this issue :
http://jira.codehaus.org/browse/MPJAVADOC-35

An example was given here (but now they corrected their javadoc problems) :
http://sqlcli.sourceforge.net/javadoc-audit-report.html

Even if were interested to integrate it, I'm not sure that we can upload the Doc Check Doclet on ibiblio (license problems). Thus, we can't depend on it :-(

Arnaud

> -----Message d'origine-----
> De : Shinobu Kawai [mailto:shinobu@ieee.org] 
> Envoyé : jeudi 29 juillet 2004 17:57
> À : Maven Users List
> Objet : javadoc plugin and Doc Check Doclet
> 
> 
> 
> Hi!
> 
> Has anyone used Doc Check Doclet for the javadoc plugin?
>     cf. http://java.sun.com/j2se/javadoc/doccheck/
> 
> Since the Doclet doesn't support some of the options, I had 
> to make some changes in the javadoc plugin:
> 
> Inside MY build.properties, I added
>     maven.javadoc.doclet=com.sun.tools.doclets.doccheck.DocCheck
>     maven.javadoc.docletpath=${basedir}/lib/doccheck.jar
>     maven.javadoc.use=false
> 
> From the javadoc's plugin.properties, I commented out
>     #maven.javadoc.windowtitle           = ${pom.name} 
> ${pom.currentVersion} API
> 
> From the javadoc's plugin.jelly, I erased from the ant:javadoc
>     doctitle="${maven.javadoc.windowtitle}"
>     bottom="${copyright}"
>     stylesheetfile="${maven.javadoc.stylesheet}"
> 
> Now, I get the Doc Check output instead of my Javadoc.  Of 
> course, I want both to show up on my project page, so I'm 
> planning to add a doc:registerReport to the jelly.plugin. But 
> before I do, has anyone done this before, in a more neatly, 
> don't-have-to-change-the-plugin way?
> 
> TIA,
> -- Shinobu Kawai
> 
> --
> Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: javadoc plugin and Doc Check Doclet

Posted by Shinobu Kawai <sh...@ieee.org>.
Hi Brett!

> I think an independent plugin hosted on maven-plugins.sf.net is the
> best approach here.
> 
> - Brett
Cool!  That should be my next step.  I take a look at it.

> > Just tried the extension on Jira.  I got 49 errors, whereas Doc Check
> > reported 163.  The extension picks up only malformed tags, but Doc Check
> > picks up missing tags also.
> > I'll go ahead and put Doc Check into the plugin, and I guess I should
> > talk to the Sun people about it...  Or if it is easy to make an
> > independent plugin, I'll try that also.
Meanwhile, here's my nasty javadoc-plugin extension:

Added to MY build.properties:
    maven.doccheck.doclet=com.sun.tools.doclets.doccheck.DocCheck
    maven.doccheck.docletpath=${basedir}/lib/doccheck.jar

Added to plugin.properties:
    maven.doccheck.destdir=${maven.docs.dest}/doccheck

Added to plugin.jelly: (Ready for the nasty part? ;-))
# in maven-javadoc-plugin:register
      <doc:registerReport 
        name="JavaDocs DocCheck Report"
        pluginName=""
        link="doccheck/index"
        target="_blank"
        description="JavaDoc DocCheck."
        />
# in maven-javadoc-plugin:deregister
      <doc:deregisterReport name="JavaDocs DocCheck Report"/>
#in maven-javadoc-plugin:report
      <ant:mkdir dir="${maven.doccheck.destdir}"/>
      <ant:javadoc
        packagenames="${pom.package}.*"
        destdir="${maven.doccheck.destdir}"
        author="${maven.javadoc.author}"
        public="${maven.javadoc.public}"
        package="${maven.javadoc.package}" 
        private="${maven.javadoc.private}"
        version="${maven.javadoc.version}"
        additionalparam="${maven.doccheck.additionalparam}"
        useexternalfile="${maven.javadoc.useexternalfile}"
        verbose="${maven.javadoc.debug}"
        >

        <ant:sourcepath>
          <ant:path refid="internal.javadoc.sources"/>
        </ant:sourcepath>
        
        <j:if test="${context.getVariable('maven.javadoc.source') != null}">
          <ant:setProperty name="source" value="${maven.javadoc.source}" />
        </j:if>

        <j:if test="${context.getVariable('maven.compile.encoding') != null}">
          <ant:setProperty name="encoding" value="${maven.compile.encoding}" />
        </j:if>
        
        <j:if test="${context.getVariable('maven.javadoc.excludepackagenames') != null}">
          <ant:setProperty name="excludepackagenames" value="${maven.javadoc.excludepackagenames}" />
        </j:if>

        <!-- Process/Parse links -->
        <!-- This code allows to specify a packagelistLoc even when in online mode -->
        <j:forEach var="link" items="${links}">
          <j:set var="pos" value="${link.indexOf('#')}" />
    
          <!-- set href and packagelistLoc -->
          <j:choose>
            <!-- I am bad with jelly, the test is: "pos == -1" -->
            <j:when test="${1+pos == 0}">
              <j:set var="href" value="${link.trim()}" />
              <j:set var="packagelistLoc" value="${href}"/>
            </j:when>
            <j:otherwise>
              <j:set var="href" value="${link.substring(0,pos).trim()}"/>
              <j:set var="packagelistLoc" value="${link.substring(pos).substring(1).trim()}"/>
            </j:otherwise>
          </j:choose>
    
          <!-- generate the link -->
          <j:choose>
            <j:when test="${online}" >
          <ant:link href="${href}" offline="false" packagelistLoc="${packagelistLoc}" />
            </j:when>
            <j:otherwise>
          <ant:link href="${href}" offline="true" packagelistLoc="${packagelistLoc}" />
            </j:otherwise>
          </j:choose>
        </j:forEach>
    
        <ant:classpath>
          <ant:path refid="maven.dependency.classpath"/>
          <ant:path location="${maven.build.dest}"/>
        </ant:classpath>
    
        <j:if test="${context.getVariable('maven.javadoc.locale') != null}">
          <ant:setProperty name="locale" value="${maven.javadoc.locale}" />
        </j:if>
    
        <j:if test="${context.getVariable('maven.javadoc.overview') != null}">
          <ant:setProperty name="overview" value="${maven.javadoc.overview}" />
        </j:if>
    
        <j:if test="${maxMemory != null}">
          <ant:setProperty name="maxmemory" value="${maven.javadoc.maxmemory}" />
        </j:if>
    
        <j:forEach var="packageGroup" items="${pom.packageGroups}">
          <ant:group title="${packageGroup.title}" packages="${packageGroup.packages}"/>
        </j:forEach>
    
        <!-- allow custom doclets -->    
        <j:if test="${context.getVariable('maven.doccheck.doclet') != null}">
          <ant:setProperty name="doclet" value="${maven.doccheck.doclet}" />
        </j:if>
        <j:if test="${context.getVariable('maven.doccheck.docletpath') != null}">
          <ant:setProperty name="docletpath" value="${maven.doccheck.docletpath}" />
        </j:if>
    
        <!-- allow custom tags -->    
        <util:tokenize var="listOfTags" delim=" ">${maven.javadoc.customtags}</util:tokenize>
        <j:forEach var="someTag" items="${listOfTags}">
          <j:set var="nameVar" value="${someTag}.name"/>
          <j:set var="name" value="${context.findVariable(nameVar)}"/>
          <j:set var="descriptionVar" value="${someTag}.description"/>
          <j:set var="description" value="${context.findVariable(descriptionVar)}"/>
          <j:set var="enabledVar" value="${someTag}.enabled"/>
          <j:set var="enabled" value="${context.findVariable(enabledVar)}"/>
          <j:set var="scopeVar" value="${someTag}.scope"/>
          <j:set var="scope" value="${context.findVariable(scopeVar)}"/>
          <ant:tag name="${name}" description="${description}"
           enabled="${enabled}" scope="${scope}"/>
        </j:forEach>
    
        <!-- allow taglets -->
        <util:tokenize var="listOfTaglets" delim="," trim="true">${maven.javadoc.taglets}</util:tokenize>
        <j:set var="tagletPath" value="${context.getVariable('maven.javadoc.tagletpath')}" />
        <j:forEach var="someTaglet" items="${listOfTaglets}">
          <ant:taglet name="${someTaglet}" path="${tagletPath}" />
        </j:forEach>

      </ant:javadoc>

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: javadoc plugin and Doc Check Doclet

Posted by Brett Porter <br...@gmail.com>.
I think an independent plugin hosted on maven-plugins.sf.net is the
best approach here.

- Brett

On Fri, 30 Jul 2004 14:03:05 +0900, Shinobu Kawai <sh...@ieee.org> wrote:
> 
> Hi!
> 
> Just tried the extension on Jira.  I got 49 errors, whereas Doc Check
> reported 163.  The extension picks up only malformed tags, but Doc Check
> picks up missing tags also.
> I'll go ahead and put Doc Check into the plugin, and I guess I should
> talk to the Sun people about it...  Or if it is easy to make an
> independent plugin, I'll try that also.
> 
> Best regards,
> -- Shinobu Kawai
> 
> On Fri, 30 Jul 2004 09:36:48 +0900
> 
> 
> Shinobu Kawai <sh...@ieee.org> wrote:
> 
> >
> > Hi Arnaud!
> >
> > Thanks for the information.  It looks like I have to change the
> > javadoc plugin anyways, but I'll give it a try.
> >
> > Best regards,
> > -- Shinobu Kawai
> >
> > > A similar enhancement is proposed in this issue :
> > > http://jira.codehaus.org/browse/MPJAVADOC-35
> > >
> > > An example was given here (but now they corrected their javadoc problems) :
> > > http://sqlcli.sourceforge.net/javadoc-audit-report.html
> > >
> > > Even if were interested to integrate it, I'm not sure that we can upload the Doc Check Doclet on ibiblio (license problems). Thus, we can't depend on it :-(
> > >
> > > Arnaud
> > >
> > > > -----Message d'origine-----
> > > > De : Shinobu Kawai [mailto:shinobu@ieee.org]
> > > > Envoyé : jeudi 29 juillet 2004 17:57
> > > > À : Maven Users List
> > > > Objet : javadoc plugin and Doc Check Doclet
> > > >
> > > >
> > > >
> > > > Hi!
> > > >
> > > > Has anyone used Doc Check Doclet for the javadoc plugin?
> > > >     cf. http://java.sun.com/j2se/javadoc/doccheck/
> > > >
> > > > Since the Doclet doesn't support some of the options, I had
> > > > to make some changes in the javadoc plugin:
> > > >
> > > > Inside MY build.properties, I added
> > > >     maven.javadoc.doclet=com.sun.tools.doclets.doccheck.DocCheck
> > > >     maven.javadoc.docletpath=${basedir}/lib/doccheck.jar
> > > >     maven.javadoc.use=false
> > > >
> > > > From the javadoc's plugin.properties, I commented out
> > > >     #maven.javadoc.windowtitle           = ${pom.name}
> > > > ${pom.currentVersion} API
> > > >
> > > > From the javadoc's plugin.jelly, I erased from the ant:javadoc
> > > >     doctitle="${maven.javadoc.windowtitle}"
> > > >     bottom="${copyright}"
> > > >     stylesheetfile="${maven.javadoc.stylesheet}"
> > > >
> > > > Now, I get the Doc Check output instead of my Javadoc.  Of
> > > > course, I want both to show up on my project page, so I'm
> > > > planning to add a doc:registerReport to the jelly.plugin. But
> > > > before I do, has anyone done this before, in a more neatly,
> > > > don't-have-to-change-the-plugin way?
> > > >
> > > > TIA,
> > > > -- Shinobu Kawai
> 
> --
> Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: javadoc plugin and Doc Check Doclet

Posted by Shinobu Kawai <sh...@ieee.org>.
Hi!

Just tried the extension on Jira.  I got 49 errors, whereas Doc Check
reported 163.  The extension picks up only malformed tags, but Doc Check
picks up missing tags also.
I'll go ahead and put Doc Check into the plugin, and I guess I should
talk to the Sun people about it...  Or if it is easy to make an
independent plugin, I'll try that also.

Best regards,
-- Shinobu Kawai

On Fri, 30 Jul 2004 09:36:48 +0900
Shinobu Kawai <sh...@ieee.org> wrote:

> 
> Hi Arnaud!
> 
> Thanks for the information.  It looks like I have to change the
> javadoc plugin anyways, but I'll give it a try.
> 
> Best regards,
> -- Shinobu Kawai
> 
> > A similar enhancement is proposed in this issue :
> > http://jira.codehaus.org/browse/MPJAVADOC-35
> > 
> > An example was given here (but now they corrected their javadoc problems) :
> > http://sqlcli.sourceforge.net/javadoc-audit-report.html
> > 
> > Even if were interested to integrate it, I'm not sure that we can upload the Doc Check Doclet on ibiblio (license problems). Thus, we can't depend on it :-(
> > 
> > Arnaud
> > 
> > > -----Message d'origine-----
> > > De : Shinobu Kawai [mailto:shinobu@ieee.org] 
> > > Envoyé : jeudi 29 juillet 2004 17:57
> > > À : Maven Users List
> > > Objet : javadoc plugin and Doc Check Doclet
> > > 
> > > 
> > > 
> > > Hi!
> > > 
> > > Has anyone used Doc Check Doclet for the javadoc plugin?
> > >     cf. http://java.sun.com/j2se/javadoc/doccheck/
> > > 
> > > Since the Doclet doesn't support some of the options, I had 
> > > to make some changes in the javadoc plugin:
> > > 
> > > Inside MY build.properties, I added
> > >     maven.javadoc.doclet=com.sun.tools.doclets.doccheck.DocCheck
> > >     maven.javadoc.docletpath=${basedir}/lib/doccheck.jar
> > >     maven.javadoc.use=false
> > > 
> > > From the javadoc's plugin.properties, I commented out
> > >     #maven.javadoc.windowtitle           = ${pom.name} 
> > > ${pom.currentVersion} API
> > > 
> > > From the javadoc's plugin.jelly, I erased from the ant:javadoc
> > >     doctitle="${maven.javadoc.windowtitle}"
> > >     bottom="${copyright}"
> > >     stylesheetfile="${maven.javadoc.stylesheet}"
> > > 
> > > Now, I get the Doc Check output instead of my Javadoc.  Of 
> > > course, I want both to show up on my project page, so I'm 
> > > planning to add a doc:registerReport to the jelly.plugin. But 
> > > before I do, has anyone done this before, in a more neatly, 
> > > don't-have-to-change-the-plugin way?
> > > 
> > > TIA,
> > > -- Shinobu Kawai

--
Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: javadoc plugin and Doc Check Doclet

Posted by Shinobu Kawai <sh...@ieee.org>.
Hi Arnaud!

Thanks for the information.  It looks like I have to change the
javadoc plugin anyways, but I'll give it a try.

Best regards,
-- Shinobu Kawai

> A similar enhancement is proposed in this issue :
> http://jira.codehaus.org/browse/MPJAVADOC-35
> 
> An example was given here (but now they corrected their javadoc problems) :
> http://sqlcli.sourceforge.net/javadoc-audit-report.html
> 
> Even if were interested to integrate it, I'm not sure that we can upload the Doc Check Doclet on ibiblio (license problems). Thus, we can't depend on it :-(
> 
> Arnaud
> 
> > -----Message d'origine-----
> > De : Shinobu Kawai [mailto:shinobu@ieee.org] 
> > Envoyé : jeudi 29 juillet 2004 17:57
> > À : Maven Users List
> > Objet : javadoc plugin and Doc Check Doclet
> > 
> > 
> > 
> > Hi!
> > 
> > Has anyone used Doc Check Doclet for the javadoc plugin?
> >     cf. http://java.sun.com/j2se/javadoc/doccheck/
> > 
> > Since the Doclet doesn't support some of the options, I had 
> > to make some changes in the javadoc plugin:
> > 
> > Inside MY build.properties, I added
> >     maven.javadoc.doclet=com.sun.tools.doclets.doccheck.DocCheck
> >     maven.javadoc.docletpath=${basedir}/lib/doccheck.jar
> >     maven.javadoc.use=false
> > 
> > From the javadoc's plugin.properties, I commented out
> >     #maven.javadoc.windowtitle           = ${pom.name} 
> > ${pom.currentVersion} API
> > 
> > From the javadoc's plugin.jelly, I erased from the ant:javadoc
> >     doctitle="${maven.javadoc.windowtitle}"
> >     bottom="${copyright}"
> >     stylesheetfile="${maven.javadoc.stylesheet}"
> > 
> > Now, I get the Doc Check output instead of my Javadoc.  Of 
> > course, I want both to show up on my project page, so I'm 
> > planning to add a doc:registerReport to the jelly.plugin. But 
> > before I do, has anyone done this before, in a more neatly, 
> > don't-have-to-change-the-plugin way?
> > 
> > TIA,
> > -- Shinobu Kawai
> > 
> > --
> > Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>

--
Shinobu Kawai <shinobu@ieee.org, shinobu@computer.org>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org