You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2021/05/03 14:44:52 UTC

[tomee-site-generator] branch master updated (f4fe3f0 -> df95ec8)

This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-site-generator.git.


    from f4fe3f0  Merge pull request #24 from cesarhernandezgt/test-results
     new bea1535  Add favicons for javadocs
     new 67afc97  Merge branch 'master' of github.com:apache/tomee-site-generator
     new df95ec8  Results from EC2

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/tomee/website/Javadocs.java    |  70 ++++++--
 src/main/jbake/assets/img/jakarta-favicon.ico      | Bin 0 -> 32988 bytes
 src/main/jbake/assets/img/microprofile-favicon.png | Bin 0 -> 683 bytes
 .../9.0.0-M7/plume/webprofile-9.1.adoc             | 190 +++------------------
 4 files changed, 77 insertions(+), 183 deletions(-)
 create mode 100644 src/main/jbake/assets/img/jakarta-favicon.ico
 create mode 100644 src/main/jbake/assets/img/microprofile-favicon.png

[tomee-site-generator] 02/03: Merge branch 'master' of github.com:apache/tomee-site-generator

Posted by db...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-site-generator.git

commit 67afc9701005697674da90fe9f76eccca3e9685d
Merge: bea1535 f4fe3f0
Author: David Blevins <da...@gmail.com>
AuthorDate: Mon May 3 07:36:10 2021 -0700

    Merge branch 'master' of github.com:apache/tomee-site-generator

 README.adoc                                        |    4 +
 pom.xml                                            |    7 +
 .../apache/tomee/website/AbstractDownloadsNG.java  |  364 +++++++
 .../java/org/apache/tomee/website/Downloads.java   |    4 +-
 .../java/org/apache/tomee/website/DownloadsNG.java |   44 +
 src/main/java/org/apache/tomee/website/JBake.java  |   21 +
 src/main/jbake/assets/img/apache_tomee-logo.jpg    |  Bin 0 -> 28505 bytes
 .../9.0.0-M7/plume/webprofile-9.1.adoc             |  273 +++++
 src/main/jbake/content/download-archive.adoc       | 1114 +++++++++++---------
 src/main/jbake/content/download-ng.adoc            |  141 +--
 src/main/jbake/content/tck-results.adoc            |   11 +
 11 files changed, 1393 insertions(+), 590 deletions(-)

[tomee-site-generator] 01/03: Add favicons for javadocs

Posted by db...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-site-generator.git

commit bea15354e5c0857e71dd20d458538ae9dba8a629
Author: David Blevins <da...@gmail.com>
AuthorDate: Sun Aug 9 20:12:28 2020 -0700

    Add favicons for javadocs
---
 .../java/org/apache/tomee/website/Javadocs.java    |  70 +++++++++++++++++----
 src/main/jbake/assets/img/jakarta-favicon.ico      | Bin 0 -> 32988 bytes
 src/main/jbake/assets/img/microprofile-favicon.png | Bin 0 -> 683 bytes
 3 files changed, 57 insertions(+), 13 deletions(-)

diff --git a/src/main/java/org/apache/tomee/website/Javadocs.java b/src/main/java/org/apache/tomee/website/Javadocs.java
index 01226d8..33779f8 100644
--- a/src/main/java/org/apache/tomee/website/Javadocs.java
+++ b/src/main/java/org/apache/tomee/website/Javadocs.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomee.website;
 
+import lombok.Data;
 import org.apache.openejb.loader.Files;
 import org.apache.openejb.loader.IO;
 import org.apache.openejb.util.Join;
@@ -23,6 +24,7 @@ import org.apache.openejb.util.Pipe;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.List;
@@ -122,6 +124,8 @@ public class Javadocs {
                 throw new IllegalStateException("Command failed");
             }
 
+            final String favicon = getFavicon(source);
+
             // Scrub generated timestamps as it causes 26k needless file updates
             // on the svn commit for every time the generator runs
             try {
@@ -129,31 +133,71 @@ public class Javadocs {
                         .map(Path::toFile)
                         .filter(File::isFile)
                         .filter(this::isHtml)
-                        .forEach(Javadocs::removeGeneratedDate);
+                        .map(Content::from)
+                        .map(Javadocs::removeGeneratedDate)
+                        .map(content -> addFavicon(content, favicon))
+                        .forEach(Content::write);
             } catch (IOException e) {
-                throw new IllegalStateException("Failed to remove timestamp from generated javadoc html");
+                throw new IllegalStateException("Failed to update generated javadoc html");
             }
 
         });
     }
 
+    private String getFavicon(final Source source) {
+        if (source.getName().startsWith("jakarta")) {
+            return "/img/jakarta-favicon.ico";
+        } else if (source.getName().startsWith("microprofile")) {
+            return "/img/microprofile-favicon.png";
+        } else {
+            return "/favicon.png";
+        }
+    }
+
     public List<JavadocSource> getJavadocSources() {
         return javadocSources;
     }
 
-    public static void removeGeneratedDate(final File file) {
-        try {
-            final List<String> lines = Stream.of(IO.slurp(file).split("\n"))
-                    .filter(line -> !line.contains("<!-- Generated by javadoc"))
-                    .filter(line -> !line.contains("<meta name=\"date\" content=\""))
-                    .collect(Collectors.toList());
-            final String updated = Join.join("\n", lines) + "\n";
+    private static Content removeGeneratedDate(final Content content) {
+        final List<String> lines = Stream.of(content.content.split("\n"))
+                .filter(line -> !line.contains("<!-- Generated by javadoc"))
+                .filter(line -> !line.contains("<meta name=\"date\" content=\""))
+                .collect(Collectors.toList());
 
-            // Write the cleaned version to disk
-            IO.copy(IO.read(updated), file);
+        final String updated = Join.join("\n", lines) + "\n";
 
-        } catch (IOException e) {
-            throw new IllegalStateException(e);
+        return content.modified(updated);
+    }
+
+    private static Content addFavicon(final Content content, final String favicon) {
+        final String link = String.format("%n<link rel=\"shortcut icon\" href=\"%s\">%n", favicon);
+        return content.modified(content.content.replace("</head>", link + "</head>"));
+    }
+
+    @Data
+    @lombok.AllArgsConstructor
+    private static class Content {
+        private final File file;
+        private final String content;
+
+        public Content modified(final String newContent) {
+            return new Content(file, newContent);
+        }
+
+        public void write() {
+            try {
+                IO.copy(IO.read(content), file);
+            } catch (IOException e) {
+                throw new UncheckedIOException("Unable to write file: " + file.getAbsolutePath(), e);
+            }
+        }
+
+        public static Content from(final File file) {
+            try {
+                return new Content(file, IO.slurp(file));
+            } catch (IOException e) {
+                throw new UncheckedIOException("Unable to read file: " + file.getAbsolutePath(), e);
+            }
         }
     }
 
diff --git a/src/main/jbake/assets/img/jakarta-favicon.ico b/src/main/jbake/assets/img/jakarta-favicon.ico
new file mode 100644
index 0000000..1557db1
Binary files /dev/null and b/src/main/jbake/assets/img/jakarta-favicon.ico differ
diff --git a/src/main/jbake/assets/img/microprofile-favicon.png b/src/main/jbake/assets/img/microprofile-favicon.png
new file mode 100644
index 0000000..0559671
Binary files /dev/null and b/src/main/jbake/assets/img/microprofile-favicon.png differ

[tomee-site-generator] 03/03: Results from EC2

Posted by db...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-site-generator.git

commit df95ec84fb155806f9d9e6162f564bd4fd467a4c
Author: David Blevins <da...@gmail.com>
AuthorDate: Mon May 3 07:44:35 2021 -0700

    Results from EC2
---
 .../9.0.0-M7/plume/webprofile-9.1.adoc             | 190 +++------------------
 1 file changed, 20 insertions(+), 170 deletions(-)

diff --git a/src/main/jbake/content/certifications/9.0.0-M7/plume/webprofile-9.1.adoc b/src/main/jbake/content/certifications/9.0.0-M7/plume/webprofile-9.1.adoc
index 17f355b..fc5cab4 100644
--- a/src/main/jbake/content/certifications/9.0.0-M7/plume/webprofile-9.1.adoc
+++ b/src/main/jbake/content/certifications/9.0.0-M7/plume/webprofile-9.1.adoc
@@ -44,176 +44,26 @@ Jakarta Bean Validation 3.0.0 TCK
 
 === Web Profile TCK Test results
 Test results:
-----
-Test name: connector
-[javatest.batch] Completed running 252 tests.
-[javatest.batch] Number of Tests Passed      = 252
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: ejb30_lite
-[javatest.batch] Completed running 1873 tests.
-[javatest.batch] Number of Tests Passed      = 1873
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: ejb32_lite
-[javatest.batch] Completed running 456 tests.
-[javatest.batch] Number of Tests Passed      = 456
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: el
-[javatest.batch] Completed running 667 tests.
-[javatest.batch] Number of Tests Passed      = 667
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jaxrs
-[javatest.batch] Completed running 974 tests.
-[javatest.batch] Number of Tests Passed      = 974
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_batchUpdate
-[javatest.batch] Completed running 34 tests.
-[javatest.batch] Number of Tests Passed      = 34
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_callStmt
-[javatest.batch] Completed running 796 tests.
-[javatest.batch] Number of Tests Passed      = 796
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_connection
-[javatest.batch] Completed running 18 tests.
-[javatest.batch] Number of Tests Passed      = 18
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_dateTime
-[javatest.batch] Completed running 76 tests.
-[javatest.batch] Number of Tests Passed      = 76
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_dbMeta
-[javatest.batch] Completed running 470 tests.
-[javatest.batch] Number of Tests Passed      = 470
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_escapeSyntax
-[javatest.batch] Completed running 162 tests.
-[javatest.batch] Number of Tests Passed      = 162
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_exception
-[javatest.batch] Completed running 28 tests.
-[javatest.batch] Number of Tests Passed      = 28
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_prepStmt
-[javatest.batch] Completed running 542 tests.
-[javatest.batch] Number of Tests Passed      = 542
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_resultSet
-[javatest.batch] Completed running 228 tests.
-[javatest.batch] Number of Tests Passed      = 228
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_rsMeta
-[javatest.batch] Completed running 42 tests.
-[javatest.batch] Number of Tests Passed      = 42
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jdbc_ee_stmt
-[javatest.batch] Completed running 66 tests.
-[javatest.batch] Number of Tests Passed      = 66
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jpa_core
-[javatest.batch] Completed running 1841 tests.
-[javatest.batch] Number of Tests Passed      = 1841
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jpa_ee
-[javatest.batch] Completed running 38 tests.
-[javatest.batch] Number of Tests Passed      = 38
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jsf
-[javatest.batch] Completed running 5526 tests.
-[javatest.batch] Number of Tests Passed      = 5526
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jsonb
-[javatest.batch] Completed running 532 tests.
-[javatest.batch] Number of Tests Passed      = 532
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jsonp
-[javatest.batch] Completed running 372 tests.
-[javatest.batch] Number of Tests Passed      = 372
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jsp
-[javatest.batch] Completed running 720 tests.
-[javatest.batch] Number of Tests Passed      = 720
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jstl
-[javatest.batch] Completed running 541 tests.
-[javatest.batch] Number of Tests Passed      = 541
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: jta
-[javatest.batch] Completed running 154 tests.
-[javatest.batch] Number of Tests Passed      = 154
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: securityapi
-[javatest.batch] Completed running 84 tests.
-[javatest.batch] Number of Tests Passed      = 84
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: servlet
-[javatest.batch] Completed running 1640 tests.
-[javatest.batch] Number of Tests Passed      = 1640
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: signaturetest_javaee
-[javatest.batch] Completed running 2 tests.
-[javatest.batch] Number of Tests Passed      = 2
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-Test name: websocket
-[javatest.batch] Completed running 745 tests.
-[javatest.batch] Number of Tests Passed      = 745
-[javatest.batch] Number of Tests Failed      = 0
-[javatest.batch] Number of Tests with Errors = 0
-
-----
+[width="100%",options="header]
+|=======
+|section|tests|passed|failed
+|ejb32|809|809|0
+|el|667|667|0
+|jaspic|68|68|0
+|jaxrs|2622|2622|0
+|jdbc|4924|4924|0
+|jpa|11025|11025|0
+|jsf|5517|5517|0
+|jsonb|232|232|0
+|jsonp|744|744|0
+|jsp|730|730|0
+|jstl|541|541|0
+|jta|195|195|0
+|securityapi|85|85|0
+|servlet|1700|1700|0
+|signaturetest|2|0|0
+|websocket|725|725|0
+|=======
 
 === Additional standalone TCK Test results
 Standalone test results: