From 4c41e3ba85e0601eae1e6adf736ec415ad5df249 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Tue, 13 Oct 2020 11:56:34 +0100 Subject: [PATCH] Specify version for maven plugin --- index.js | 4 ++-- utils.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5369ebfba..0ed910751 100644 --- a/index.js +++ b/index.js @@ -383,12 +383,12 @@ const createJavaBom = async ( const f = pomFiles[i]; const basePath = pathLib.dirname(f); console.log( - "Executing 'mvn org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom' in", + "Executing 'mvn org.cyclonedx:cyclonedx-maven-plugin:2.1.0:makeAggregateBom' in", basePath ); result = spawnSync( MVN_CMD, - ["org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom"], + ["org.cyclonedx:cyclonedx-maven-plugin:2.1.0:makeAggregateBom"], { cwd: basePath } ); if (result.status == 1 || result.error) { diff --git a/utils.js b/utils.js index 3dce1e579..2c9238e2c 100644 --- a/utils.js +++ b/utils.js @@ -551,6 +551,10 @@ const getPyMetadata = async function (pkgList) { const cdepList = []; for (const p of pkgList) { try { + // Some packages support extra modules + if (p.name.includes("[")) { + p.name = p.name.split("[")[0]; + } const res = await got.get(PYPI_URL + p.name + "/json", { responseType: "json", });