aheritier    2004/09/24 14:37:36

  Modified:    javadoc  plugin.jelly plugin.properties
               javadoc/xdocs changes.xml
  Log:
  Fix MPJAVADOC-46
  
  Revision  Changes    Path
  1.62      +130 -80   maven-plugins/javadoc/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/javadoc/plugin.jelly,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- plugin.jelly      3 Sep 2004 22:41:32 -0000       1.61
  +++ plugin.jelly      24 Sep 2004 21:37:36 -0000      1.62
  @@ -291,27 +291,17 @@
           </j:otherwise>
         </j:choose>
         
  -      <ant:javadoc
  -        packagenames    ="${packageNamesValue}"
  -        destdir         ="${maven.javadoc.destdir}"
  -        author          ="${maven.javadoc.author}"
  -        public          ="${maven.javadoc.public}"
  -        package         ="${maven.javadoc.package}" 
  -        private         ="${maven.javadoc.private}"
  -        version         ="${maven.javadoc.version}"
  -        use             ="${maven.javadoc.use}"
  -        windowtitle     ="${maven.javadoc.windowtitle}"
  -        doctitle        ="${maven.javadoc.windowtitle}"
  -        stylesheetfile  ="${maven.javadoc.stylesheet}"
  -        additionalparam ="${maven.javadoc.additionalparam}"
  -        useexternalfile ="${maven.javadoc.useexternalfile}"
  -        verbose         ="${maven.javadoc.debug}"
  -        >
  +      <ant:javadoc>
   
           <ant:sourcepath>
             <ant:path refid="internal_javadoc_sources"/>
           </ant:sourcepath>
   
  +        <ant:classpath>
  +          <ant:path refid="maven.dependency.classpath"/>
  +          <ant:path location="${maven.build.dest}"/>
  +        </ant:classpath>
  +
           <j:if test="${pom.package == null or pom.package.equals('')}">
             <util:tokenize var="sources_dirs" 
delim="${path.separator}">${context.getAntProject().getReferences().get('maven.compile.src.set')}</util:tokenize>
             <j:forEach var="dir" items="${sources_dirs}">
  @@ -321,7 +311,6 @@
             </j:forEach>
           </j:if>
   
  -
           <j:if test="${context.getVariable('maven.javadoc.source') != null}">
             <ant:setProperty name="source" value="${maven.javadoc.source}" />
           </j:if>
  @@ -334,44 +323,34 @@
             <ant:setProperty name="excludepackagenames" 
value="${maven.javadoc.excludepackagenames}" />
           </j:if>
   
  -        <j:if test="${context.getVariable('maven.javadoc.bottom') != null and 
!context.getVariable('maven.javadoc.bottom').equals('')}">
  -          <ant:setProperty name="bottom" value="${maven.javadoc.bottom}" />
  +        <j:if test="${context.getVariable('packageNamesValue') != null}">
  +          <ant:setProperty name="packagenames" value="${packageNamesValue}" />
  +        </j:if>
  +
  +        <j:if test="${context.getVariable('maven.javadoc.public') != null}">
  +          <ant:setProperty name="public" value="${maven.javadoc.public}" />
  +        </j:if>
  +
  +        <j:if test="${context.getVariable('maven.javadoc.package') != null}">
  +          <ant:setProperty name="package" value="${maven.javadoc.package}" />
  +        </j:if>
  +
  +        <j:if test="${context.getVariable('maven.javadoc.private') != null}">
  +          <ant:setProperty name="private" value="${maven.javadoc.private}" />
  +        </j:if>
  +
  +        <j:if test="${context.getVariable('maven.javadoc.additionalparam') != 
null}">
  +          <ant:setProperty name="additionalparam" 
value="${maven.javadoc.additionalparam}" />
  +        </j:if>
  +
  +        <j:if test="${context.getVariable('maven.javadoc.useexternalfile') != 
null}">
  +          <ant:setProperty name="useexternalfile" 
value="${maven.javadoc.useexternalfile}" />
  +        </j:if>
  +
  +        <j:if test="${context.getVariable('maven.javadoc.debug') != null}">
  +          <ant:setProperty name="verbose" value="${maven.javadoc.debug}" />
           </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>
  @@ -382,13 +361,11 @@
       
           <j:if test="${maxMemory != null}">
             <ant:setProperty name="maxmemory" value="${maven.javadoc.maxmemory}" />
  -        </j:if>
  +        </j:if>   
       
  -        <j:forEach var="packageGroup" items="${pom.packageGroups}">
  -          <ant:group title="${packageGroup.title}" 
packages="${packageGroup.packages}"/>
  -        </j:forEach>
  -    
  -        <!-- allow custom doclets -->    
  +        <!-- ========================== -->
  +        <!-- allow custom doclets       -->
  +        <!-- ========================== -->
           <j:if test="${context.getVariable('maven.javadoc.doclet') != null}">
             <ant:setProperty name="doclet" value="${maven.javadoc.doclet}" />
           </j:if>
  @@ -396,27 +373,100 @@
             <ant:setProperty name="docletpath" value="${maven.javadoc.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>
  +        <!-- ========================== -->
  +        <!-- Standard doclet parameters -->
  +        <!-- ========================== -->
  +                
  +        <j:if test="${context.getVariable('maven.javadoc.doclet') == null}">
  +
  +          <j:if test="${context.getVariable('maven.javadoc.destdir') != null}">
  +            <ant:setProperty name="destdir" value="${maven.javadoc.destdir}" />
  +          </j:if>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.use') != null}">
  +            <ant:setProperty name="use" value="${maven.javadoc.use}" />
  +          </j:if>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.version') != null}">
  +            <ant:setProperty name="version" value="${maven.javadoc.version}" />
  +          </j:if>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.author') != null}">
  +            <ant:setProperty name="author" value="${maven.javadoc.author}" />
  +          </j:if>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.windowtitle') != null}">
  +            <ant:setProperty name="windowtitle" 
value="${maven.javadoc.windowtitle}" />
  +          </j:if>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.windowtitle') != null}">
  +            <ant:setProperty name="doctitle" value="${maven.javadoc.windowtitle}" />
  +          </j:if>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.bottom') != null and 
!context.getVariable('maven.javadoc.bottom').equals('')}">
  +            <ant:setProperty name="bottom" value="${maven.javadoc.bottom}" />
  +          </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>
  +  
  +          <j:forEach var="packageGroup" items="${pom.packageGroups}">
  +            <ant:group title="${packageGroup.title}" 
packages="${packageGroup.packages}"/>
  +          </j:forEach>
  +  
  +          <j:if test="${context.getVariable('maven.javadoc.stylesheet') != null}">
  +            <ant:setProperty name="stylesheetfile" 
value="${maven.javadoc.stylesheet}" />
  +          </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>
  +
  +        </j:if>
   
         </ant:javadoc>
         
  
  
  
  1.19      +1 -1      maven-plugins/javadoc/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven-plugins/javadoc/plugin.properties,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- plugin.properties 21 Aug 2004 18:42:04 -0000      1.18
  +++ plugin.properties 24 Sep 2004 21:37:36 -0000      1.19
  @@ -22,7 +22,7 @@
   
   #maven.javadoc.additionalparam
   maven.javadoc.author                = true
  -maven.javadoc.bottom             = Copyright &copy; ${year} 
${pom.organization.name}. All Rights Reserved.
  +maven.javadoc.bottom                = Copyright &copy; ${year} 
${pom.organization.name}. All Rights Reserved.
   #maven.javadoc.customtags           =
   maven.javadoc.debug                 = false
   maven.javadoc.destdir               = ${maven.docs.dest}/apidocs
  
  
  
  1.52      +2 -3      maven-plugins/javadoc/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/javadoc/xdocs/changes.xml,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- changes.xml       5 Sep 2004 19:56:57 -0000       1.51
  +++ changes.xml       24 Sep 2004 21:37:36 -0000      1.52
  @@ -1,5 +1,4 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -
   <!-- 
   /*
    * Copyright 2001-2004 The Apache Software Foundation.
  @@ -17,7 +16,6 @@
    * limitations under the License.
    */
    -->
  -
   <document>
     <properties>
       <title>Changes</title>
  @@ -27,9 +25,10 @@
     </properties>
     <body>
       <release version="1.7-SNAPSHOT" date="In CVS">
  -      <action dev="felipeal" type="fix" issue="MPJAVADOC-42">Javadoc warning report 
was throwing exception when used with <code>Java 1.3</code>.</action>
  +      <action dev="aheritier" type="fix" issue="MPJAVADOC-46">Standard doclet 
parameters were passed to javadoc even if another doclet is used.</action>
         <action dev="aheritier" type="fix" issue="MPJAVADOC-44">Cannot build the 
plugin with jdk 1.3</action>
         <action dev="aheritier" type="fix" issue="MPJAVADOC-43">Javadoc plugin causes 
site to fail </action>
  +      <action dev="felipeal"  type="fix" issue="MPJAVADOC-42">Javadoc warning 
report was throwing exception when used with <code>Java 1.3</code>.</action>      
         <action dev="aheritier" type="fix" issue="MPJAVADOC-41">Javadoc does not get 
created with multiple entries in maven.compile.src.set</action>
         <action dev="aheritier" type="fix" issue="MPJAVADOC-40">javadoc:jar fails if 
project doesn't have source files.</action>
         <action dev="carlos"    type="add" issue="MPJAVADOC-39">Added 
maven.javadoc.bottom property</action>
  
  
  

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

Reply via email to