You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2020/02/05 11:26:47 UTC

[camel] 05/05: Remove useless log entries during the build

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

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fbfa139c995afbcc9064ce80d68ea68dc36e9e9c
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Feb 5 12:26:22 2020 +0100

    Remove useless log entries during the build
---
 .../java/org/apache/camel/maven/packaging/PackageJaxbMojo.java    | 4 +++-
 .../org/apache/camel/maven/packaging/SchemaGeneratorMojo.java     | 8 ++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
index 5241859..3f7d94a 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
@@ -125,7 +125,9 @@ public class PackageJaxbMojo extends AbstractGeneratorMojo {
             updateResource(jaxbIndexDir, fn, sb.toString());
         }
 
-        getLog().info("Generated " + jaxbIndexOutDir + " containing " + count + " jaxb.index elements");
+        if (count > 0) {
+            getLog().info("Generated " + jaxbIndexOutDir + " containing " + count + " jaxb.index elements");
+        }
     }
 
     private IndexView createIndex(List<String> locations) throws MojoExecutionException {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java
index 9eb0a1d..2cb73c0 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java
@@ -143,7 +143,9 @@ public class SchemaGeneratorMojo extends AbstractGeneratorMojo {
                 .filter(cpa -> cpa.target().asClass().name().toString().startsWith("org.apache.camel.model."))
                 .map(cpa -> cpa.target().asClass())
                 .collect(Collectors.toSet());
-        getLog().info(String.format("Found %d core elements", coreElements.size()));
+        if (!coreElements.isEmpty()) {
+            getLog().info(String.format("Found %d core elements", coreElements.size()));
+        }
 
         // we want them to be sorted
         Set<String> propertyPlaceholderDefinitions = new TreeSet<>(String::compareToIgnoreCase);
@@ -166,7 +168,9 @@ public class SchemaGeneratorMojo extends AbstractGeneratorMojo {
                 })
                 .map(cpa -> cpa.target().asClass())
                 .collect(Collectors.toSet());
-        getLog().info(String.format("Found %d spring elements", springElements.size()));
+        if (!springElements.isEmpty()) {
+            getLog().info(String.format("Found %d spring elements", springElements.size()));
+        }
 
         for (ClassInfo element : springElements) {
             processModelClass(element, null);