[ 
https://issues.apache.org/jira/browse/LUCENE-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551191
 ] 

Matt Doar commented on LUCENE-1083:
-----------------------------------

Below is an Ant target for the core classes that works in r603799 and supports 
restricting the report to just protected and public methods (the jdiff ant task 
doesn't support that). I'll also attach the report of the differences between 
2.2.0 and 2.3.0-dev that was generated with this task. The ant target still 
needs some work to specify where jdiff is located, and to convert the periods 
in the prev.version string to underscores for the URL to the previous version 
javadocs.

{noformat}
  <target name="jdiff-core" description="Generate jdiff for core classes">
        <sequential>
      <property name="JDIFF_HOME" value="D:/mdoar/jdiff/build/jdiff-1.1.0" />
      <property name="jdiff.home" value="${JDIFF_HOME}" />
      <property name="jdiff.reportdir" value="${javadoc.dir}/core-jdiff" />
      <property name="jdiff.tmpdir" value="${javadoc.dir}/jdiff.tmp" />
      <property name="prev.version" value="2.2.0" />
      <property name="prev.src.dir" 
value="D:/mdoar/jdiff/examples/lucene-${prev.version}" />

      <mkdir dir="${jdiff.reportdir}"/>
      <mkdir dir="${jdiff.tmpdir}"/>

      <echo message="Generate the XML representing the previous API" />
      <javadoc access="${javadoc.access}"
               encoding="${build.encoding}">
          <doclet name="jdiff.JDiff"
                  path="${jdiff.home}/jdiff.jar:${jdiff.home}/xerces.jar">
            <param name="-apidir" value="${jdiff.tmpdir}" />
            <param name="-excludeclass" value="${javadoc.access}" />
            <param name="-excludemember" value="${javadoc.access}" />
            <param name="-apiname" value="${Name} ${prev.version} API" />
          </doclet>
        <packageset dir="${prev.src.dir}/src/java"/>
        <classpath refid="javadoc.classpath"/>
      </javadoc>

      <echo message="Generate the XML representing the current API" />
      <javadoc access="${javadoc.access}"
               encoding="${build.encoding}">
          <doclet name="jdiff.JDiff"
                  path="${jdiff.home}/jdiff.jar:${jdiff.home}/xerces.jar">
            <param name="-apidir" value="${jdiff.tmpdir}" />
            <param name="-excludeclass" value="${javadoc.access}" />
            <param name="-excludemember" value="${javadoc.access}" />
            <param name="-apiname" value="${Name} ${version} API" />
          </doclet>
        <packageset dir="src/java"/>
        <classpath refid="javadoc.classpath"/>
      </javadoc>

      <echo message="Generate the JDiff report comparing the APIs" />
      <javadoc
          private="yes"
          sourcepath="src/java"
          destdir="${jdiff.reportdir}"
          sourcefiles="${jdiff.home}/Null.java">
          <doclet name="jdiff.JDiff"
                  path="${jdiff.home}/jdiff.jar:${jdiff.home}/xerces.jar">
            <param name="-oldapi" value="${Name} ${prev.version} API" />
            <param name="-newapi" value="${Name} ${version} API" />
            <param name="-oldapidir" value="${jdiff.tmpdir}" />
            <param name="-newapidir" value="${jdiff.tmpdir}" />
            <param name="-javadocnew" value="../../core/" />
            <!-- TODO change . to _ in prev.version-->
            <param name="-javadocold" 
value="http://lucene.apache.org/java/${prev.version}/api/"; /> 
            <param name="-docchanges"/>
            <param name="-stats"/>
          </doclet>
        <classpath refid="javadoc.classpath"/>
      </javadoc>

    <!-- Copy image files. black.gif is only needed if -stats was used -->
    <copy file="${jdiff.home}/background.gif" todir="${jdiff.reportdir}" />
    <copy file="${jdiff.home}/black.gif" todir="${jdiff.reportdir}" />
    </sequential>
  </target>
{noformat}

> JDiff report of changes between different versions of Lucene
> ------------------------------------------------------------
>
>                 Key: LUCENE-1083
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1083
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>    Affects Versions: 2.2
>            Reporter: Matt Doar
>         Attachments: jdiff_lucene_191_220.zip, jdiff_lucene_210_220.zip
>
>
> I think that a helpful addition to the release process for Lucene would be 
> [JDiff|http://www.jdiff.org] reports of the API changes between different 
> versions. I am attaching reports of the differences between 1.9.1 and 2.2.0 
> and also between 2.1.0 and 2.2.0. The reports could be changed to only show 
> the public methods. The start page is changes.html.
> This is the Ant target I added to the top-level build.xml file in the JDiff 
> directory to produce a report:
> {noformat}
> <target name="lucene" depends="dist">
>   <taskdef name="jdiff" 
>            classname="jdiff.JDiffAntTask" 
>            classpath="${dist.dir}/antjdiff.jar" />
>   <jdiff destdir="${reports.dir}/lucene" 
>          verbose="on"
>          stats="on"
>          docchanges="on">
>     <old name="1.9.1">
>       <dirset dir="${examples.dir}/lucene-1.9.1/src/java" includes="org/**" />
>     </old>
>     <new name="2.2.0">
>       <dirset dir="${examples.dir}/lucene-2.2.0/src/java" includes="org/**" />
>     </new>
>   </jdiff>
> </target>
> {noformat}
> Disclaimer: I'm the author of JDiff

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to