maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1563449 - /maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
Date Sat, 01 Feb 2014 17:57:40 GMT
Author: rfscholte
Date: Sat Feb  1 17:57:40 2014
New Revision: 1563449

URL: http://svn.apache.org/r1563449
Log:
javadoc for JDK8 doesn't generate images anymore, so assert based on JDK version

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java?rev=1563449&r1=1563448&r2=1563449&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
Sat Feb  1 17:57:40 2014
@@ -63,7 +63,21 @@ public class JavadocJarTest
         }
 
         assertTrue( set.contains( "stylesheet.css" ) );
-        assertTrue( set.contains( "resources/inherit.gif" ) || set.contains( "resources/background.gif"
) /* JDK7 */ );
+        float javadocVersion = (Float) getVariableValueFromObject( mojo, "fJavadocVersion"
);
+        if ( Float.compare( javadocVersion, 1.7f ) < 0 )
+        {
+            assertTrue( set.contains( "resources/inherit.gif" ) );
+        }
+        else if ( Float.compare( javadocVersion, 1.8f ) < 0 )
+        {
+            assertTrue( set.contains( "resources/background.gif" ) /* JDK7 */);
+        }
+        else
+        {
+            // JDK8 has no resources anymore
+            assertFalse( set.contains( "resources" ) );
+        }
+
         assertTrue( set.contains( "javadocjar/def/package-use.html" ) );
         assertTrue( set.contains( "javadocjar/def/package-tree.html" ) );
         assertTrue( set.contains( "javadocjar/def/package-summary.html" ) );



Mime
View raw message