rfscholte commented on a change in pull request #10: [JXR-110] Use equivalent 
css/images of javadoc
URL: https://github.com/apache/maven-jxr/pull/10#discussion_r212820409
 
 

 ##########
 File path: 
maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java
 ##########
 @@ -479,6 +552,66 @@ protected void executeReport( Locale locale )
         }
     }
 
+
+    /**
+     * Determine the templateDir to use, given javadocTemplatesVersion
+     *
+     * @return
+     */
+    private String getTemplateDir()
+    {
+        // Check if overridden
+        if ( StringUtils.isEmpty( templateDir ) )
+        {
+            if ( javadocTemplatesVersion.isAtLeast( "8" ) )
+            {
+                return "templates/jdk8";
+            }
+            else if ( javadocTemplatesVersion.isAtLeast( "7" ) )
+            {
+                return "templates/jdk7";
+            }
+            else if ( javadocTemplatesVersion.isAtLeast( "4" ) )
+            {
+                return "templates/jdk4";
+            }
+            else
+            {
+                getLog().warn( "Unsupported javadocVersion: " + 
javadocTemplatesVersion + ". Fallback to original" );
+                return "templates";
+            }
+        }
+        // use value specified by user
+        return templateDir;
+    }
+
+    /**
+     * Set a new value for <code>javadocTemplatesVersion</code>
+     *
+     * @throws MavenReportException if not found
+     */
+    private void setJavadocTemplatesVersion()
+        throws MavenReportException
+    {
+        JavaVersion javaVersion = JavaVersion.JAVA_SPECIFICATION_VERSION;
 
 Review comment:
   For Java 7: `java.specification.version=1.7`
   This is not in line with the parameter, which says `Version of the Javadoc 
templates to use, ex. "4", "5" etc.`
   Since this is a returning issue, I should also think of a proper solution 
for it in plexus-java.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to