From 7b51373560943ffaab17df917a48d85cac0ca130 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Tue, 3 Sep 2024 17:32:42 +0100 Subject: [PATCH] Tune down a log Signed-off-by: Prabhu Subramanian --- index.js | 4 +++- types/index.d.ts.map | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 67695d0ff..fe394960f 100644 --- a/index.js +++ b/index.js @@ -1233,6 +1233,7 @@ export async function createJavaBom(path, options) { // For java, this would correctly include the cyclonedx maven plugin. let tools = undefined; let possible_misses = false; + let mavenDepsTreeInfoShown = false; // war/ear mode if (path.endsWith(".war") || path.endsWith(".jar")) { // Check if the file exists @@ -1324,13 +1325,14 @@ export async function createJavaBom(path, options) { } // Use the cyclonedx maven plugin if there is no preference for maven deps tree if (!PREFER_MAVEN_DEPS_TREE) { - if (DEBUG_MODE) { + if (!mavenDepsTreeInfoShown && DEBUG_MODE) { console.log( "cdxgen now supports generating SBOM with only the maven cli without the need for the cyclonedx-maven plugin. This mode works better in enterprise environments and in multi-module projects.", ); console.log( "Set the environment variable PREFER_MAVEN_DEPS_TREE to true to enable this.", ); + mavenDepsTreeInfoShown = true; } console.log( `Executing '${mavenCmd} ${mvnArgs.join(" ")}' in`, diff --git a/types/index.d.ts.map b/types/index.d.ts.map index bdd983855..e8f2be75f 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AA6vBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAyUD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BA4/BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA2chB;AAED;;;;;;;;;;GAUG;AAC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end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AA6vBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAyUD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BA8/BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA2chB;AAED;;;;;;;;;;GAUG;AACH,wEAyEC;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA2bhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BAqWhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAqIhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAiDhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBA+KhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBAsHhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,qBAuBhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BAqDhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,8BA4ChB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BAwFhB;AAED;;;;;GAKG;AACH,iDAHW,MAAM,qBAiUhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBAwJhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAmFhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA6XhB;AAED;;;;;GAKG;AACH,2CAHW,MAAM;;;;;;;;;;;;;;;;;;;;GAoChB;AAED;;;;;;;;KA+DC;A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