You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2014/09/20 01:28:45 UTC

svn commit: r1626365 - in /sis/branches/JDK8: ./ core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/ core/sis-utility/src/main/java/org/apache/sis/util/collection/ src/main/javadoc/

Author: desruisseaux
Date: Fri Sep 19 23:28:44 2014
New Revision: 1626365

URL: http://svn.apache.org/r1626365
Log:
CSS with a warning logo for API that may change.

Added:
    sis/branches/JDK8/src/main/javadoc/warning.png   (with props)
Modified:
    sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
    sis/branches/JDK8/pom.xml
    sis/branches/JDK8/src/main/javadoc/stylesheet.css

Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java?rev=1626365&r1=1626364&r2=1626365&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/doclet/Doclet.java [UTF-8] Fri Sep 19 23:28:44 2014
@@ -104,7 +104,7 @@ public final class Doclet extends HtmlDo
      * Copies the standard CSS file, then copies the custom CSS file.
      *
      * @param  inputFile        The standard CSS file generated by the standard doclet.
-     * @param  outputDirectory  The custom CSS file to copy.
+     * @param  outputDirectory  The directory where to copy the CSS file.
      * @throws IOException      If an error occurred while reading or writing.
      */
     private static void copyStylesheet(final File inputFile, final File outputDirectory) throws IOException {

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java?rev=1626365&r1=1626364&r2=1626365&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/RangeSet.java [UTF-8] Fri Sep 19 23:28:44 2014
@@ -94,7 +94,7 @@ import static org.apache.sis.util.Number
  * {@link #newRange(Comparable, Comparable)} method. Subclasses can override that method if they
  * need to customize the range objects to be created.
  *
- * <p>While it is possible to create {@code RangeSet<Date>} instances, is more efficient to
+ * <p>While it is possible to create {@code RangeSet<Date>} instances, it is more efficient to
  * use {@code RangeSet<Long>} with millisecond values because {@code RangeSet} will internally
  * use {@code long[]} arrays in the later case.</p>
  *

Modified: sis/branches/JDK8/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/pom.xml?rev=1626365&r1=1626364&r2=1626365&view=diff
==============================================================================
--- sis/branches/JDK8/pom.xml (original)
+++ sis/branches/JDK8/pom.xml Fri Sep 19 23:28:44 2014
@@ -521,6 +521,39 @@ Apache SIS is a free software, Java lang
         </configuration>
       </plugin>
 
+      <!-- Copy Javadoc resources in the top-level directory (not from "doc-files" subdirectories).
+           While the Maven documentation said that the "src/main/javadoc" directory is copied by default,
+           or a directory can be specified with <javadocResourcesDirectory>, I have been unable to make it
+           work even with absolute paths.
+        -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <configuration>
+          <encoding>${project.build.sourceEncoding}</encoding>
+        </configuration>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>prepare-package</phase> <!-- TODO: find some way to execute this plugin only before javadoc, not before JAR. -->
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <resources>
+                <resource>
+                  <directory>src/main/javadoc/</directory>
+                  <includes>
+                    <include>*.png</include>
+                  </includes>
+                </resource>
+              </resources>
+              <outputDirectory>${basedir}/target/site/apidocs/</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
       <!-- JavaDoc configuration. -->
       <plugin>
         <artifactId>maven-javadoc-plugin</artifactId>
@@ -540,28 +573,11 @@ Apache SIS is a free software, Java lang
           <breakiterator>true</breakiterator>                   <!-- Better boundary detection when determining the end of the first sentence. -->
           <stylesheetfile>src/main/javadoc/stylesheet.css</stylesheetfile>
           <validateLinks>true</validateLinks>
-
-          <!-- TODO
-            Following was used to work prior JDK 8. But as of Java 1.8.0_05 with maven-javadoc-plugin 2.9.1,
-            this does not work anymore.  A trailing slash seems mandatory with JDK 8, while the Maven plugin
-            unconditionally removes any trailing slash we may insert below. For now we workaround this issue
-            by using <additionalparam>-link ...</additionalparam> instead of <links>.
-
-            For verifying if this problem is fixed in future JDK/Maven versions, remove the -link argument,
-            uncomment the <links> block and execute "mvn javadoc:aggregate". If the following line appears,
-            then the problem is not yet fixed:
-
-            javadoc: warning - Error fetching URL: http://www.geoapi.org/snapshot/javadoc
-
-
           <links>
-            <link>http://www.geoapi.org/snapshot/javadoc</link>
             <link>http://www.geoapi.org/snapshot/pending</link>
           </links>
-          -->
 
           <additionalparam>
-              -link http://www.geoapi.org/snapshot/pending/
               -Xdoclint:syntax -Xdoclint:html -Xdoclint:missing -Xdoclint:accessibility
           </additionalparam>
 

Modified: sis/branches/JDK8/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/src/main/javadoc/stylesheet.css?rev=1626365&r1=1626364&r2=1626365&view=diff
==============================================================================
--- sis/branches/JDK8/src/main/javadoc/stylesheet.css (original)
+++ sis/branches/JDK8/src/main/javadoc/stylesheet.css Fri Sep 19 23:28:44 2014
@@ -126,15 +126,28 @@ div.note {
   margin-bottom: 9px;
 }
 
+
 /*
- * Definition of <div class="warning">
+ * The warning box for upcomming API changes. The warning icon is 64 pixels height.
+ * Since we have 30 pixels in top and bottom padding, There is 34 remaining pixels
+ * to set as the minimal height.
  */
 div.warning {
-  color:   firebrick;
-  margin-left:  40px;
-  margin-right: 40px;
-  margin-top:    9px;
-  margin-bottom: 9px;
+  border-width: 2pt;
+  border-style: solid;
+  border-color: darkred;
+  background:   antiquewhite;
+  margin:       12pt 30pt;
+  padding:      15px;
+  min-height:   34px;
+}
+
+div.warning:before {
+  position: relative;
+  float:    left;
+  top:      -15px;
+  left:     -15px;
+  content:  url("warning.png");
 }
 
 

Added: sis/branches/JDK8/src/main/javadoc/warning.png
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/src/main/javadoc/warning.png?rev=1626365&view=auto
==============================================================================
Binary file - no diff available.

Propchange: sis/branches/JDK8/src/main/javadoc/warning.png
------------------------------------------------------------------------------
    svn:mime-type = image/png