diff --git a/package.json b/package.json index b98a8bb36f..5e69fc6cae 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "snyk-go-plugin": "1.11.1", "snyk-gradle-plugin": "3.2.4", "snyk-module": "1.9.1", - "snyk-mvn-plugin": "2.7.0", + "snyk-mvn-plugin": "2.8.0", "snyk-nodejs-lockfile-parser": "1.17.0", "snyk-nuget-plugin": "1.16.0", "snyk-php-plugin": "1.7.0", diff --git a/src/lib/snyk-test/run-test.ts b/src/lib/snyk-test/run-test.ts index 6d404b3dd5..1ad119d940 100644 --- a/src/lib/snyk-test/run-test.ts +++ b/src/lib/snyk-test/run-test.ts @@ -299,6 +299,22 @@ async function assembleLocalPayloads( await spinner(spinnerLbl); const deps = await getDepsFromPlugin(root, options); analytics.add('pluginName', deps.plugin.name); + const javaVersion = _.get( + deps.plugin, + 'meta?.versionBuildInfo?.metaBuildVersion.javaVersion', + null, + ); + const mvnVersion = _.get( + deps.plugin, + 'meta?.versionBuildInfo?.metaBuildVersion.mvnVersion', + null, + ); + if (javaVersion) { + analytics.add('javaVersion', javaVersion); + } + if (mvnVersion) { + analytics.add('mvnVersion', mvnVersion); + } for (const scannedProject of deps.scannedProjects) { const pkg = scannedProject.depTree;