Author: brett
Date: Sat Sep 24 20:09:06 2005
New Revision: 291371

URL: http://svn.apache.org/viewcvs?rev=291371&view=rev
Log:
PR: MNG-779
fix defaults

Modified:
    
maven/components/trunk/maven-plugins/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java

Modified: 
maven/components/trunk/maven-plugins/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java?rev=291371&r1=291370&r2=291371&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
 Sat Sep 24 20:09:06 2005
@@ -73,26 +73,6 @@
 
     // Using for the plugin:xdoc goal. Best way?
 
-    /**
-     * Default bottom
-     */
-    private static final String DEFAULT_BOTTOM = "Copyright 
${project.inceptionYear-currentYear} ${project.organization.name}. All Rights 
Reserved.";
-
-    /**
-     * Default doctitle
-     */
-    private static final String DEFAULT_DOCTITLE = "${windowtitle}";
-
-    /**
-     * Default organization name
-     */
-    private static final String DEFAULT_ORGANIZATION_NAME = "The Apache 
Software Foundation";
-
-    /**
-     * Default window title
-     */
-    private static final String DEFAULT_WINDOW_TITLE = "${project.name} 
${project.version} API";
-
     private static final String PATH_SEPARATOR = System.getProperty( 
"path.separator" );
 
     // ----------------------------------------------------------------------
@@ -289,7 +269,7 @@
      * Specifies the text to be placed at the bottom of each output file.
      * See <a 
href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#bottom";>bottom</a>.
      *
-     * @parameter expression="${bottom}" default-value="Copyright 
${project.inceptionYear-currentYear} ${project.organization.name}. All Rights 
Reserved."
+     * @parameter expression="${bottom}" default-value="Copyright 
{inceptionYear}-{currentYear} ${project.organization.name}. All Rights 
Reserved."
      */
     private String bottom;
 
@@ -774,35 +754,19 @@
             // javadoc arguments for default doclet
             if ( StringUtils.isEmpty( doclet ) )
             {
-                // Specify default values
-                if ( bottom.equals( DEFAULT_BOTTOM ) )
+                bottom = StringUtils.replace( bottom, "{currentYear}", year );
+                if ( project.getInceptionYear() != null )
                 {
-                    bottom = "Copyright &copy; " + year + " ";
-
-                    if ( ( model.getOrganization() != null ) &&
-                        ( !StringUtils.isEmpty( 
model.getOrganization().getName() ) ) )
-                    {
-                        bottom += model.getOrganization().getName();
-                    }
-                    else
-                    {
-                        bottom += DEFAULT_ORGANIZATION_NAME;
-                    }
-                    bottom += ". All Rights Reserved.";
+                    bottom = StringUtils.replace( bottom, "{inceptionYear}", 
project.getInceptionYear() );
+                }
+                else
+                {
+                    bottom = StringUtils.replace( bottom, "{inceptionYear}-", 
"" );
                 }
 
                 if ( StringUtils.isEmpty( stylesheetfile ) )
                 {
                     stylesheetfile = javadocDirectory + File.separator + 
DEFAULT_CSS_NAME;
-                }
-                if ( windowtitle.equals( DEFAULT_WINDOW_TITLE ) )
-                {
-                    windowtitle = ( model.getName() == null ? 
model.getArtifactId() : model.getName() ) + " " +
-                        model.getVersion() + " API";
-                }
-                if ( doctitle.equals( DEFAULT_DOCTITLE ) )
-                {
-                    doctitle = windowtitle;
                 }
                 // End Specify default values
 



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

Reply via email to