maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JXR-110) Use equivalent css/images of javadoc
Date Sun, 26 Aug 2018 09:49:00 GMT

    [ https://issues.apache.org/jira/browse/JXR-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592849#comment-16592849
] 

ASF GitHub Bot commented on JXR-110:
------------------------------------

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_r212820177
 
 

 ##########
 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;
+
+        if ( StringUtils.isNotEmpty( javadocVersion ) )
+        {
+            try
+            {
+                javadocTemplatesVersion = JavaVersion.parse( javadocVersion );
+            }
+            catch ( NumberFormatException e )
 
 Review comment:
   This exception will never occur (here). `JavaVersion.parse()` is a lazy evaluator. Only
during comparison the value is evaluated. The evaluator is also aware of dashes, underscores
and classifiers like `ea`.
   Hence this method will never throw an exception.

----------------------------------------------------------------
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:
users@infra.apache.org


> Use equivalent css/images of javadoc
> ------------------------------------
>
>                 Key: JXR-110
>                 URL: https://issues.apache.org/jira/browse/JXR-110
>             Project: Maven JXR
>          Issue Type: Improvement
>    Affects Versions: 2.4
>            Reporter: Robert Scholte
>            Priority: Major
>
> Right now jxr still uses the classes javadoc style. However, if the project is built
with jdk7 or jdk8, the results of the javadoc and jxr reports are very different due to css
and images.
> It would be best if these look the same.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message