mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-26 19:11:48 +01:00
Added support for scanning of non-JAR packages from Maven
This commit is contained in:
@@ -54,7 +54,8 @@ class LibraryAdvisor @Inject() (
|
||||
val groupId = (xml \ "groupId").text
|
||||
val artifactId = (xml \ "artifactId").text
|
||||
val version = (xml \ "version").text
|
||||
Left(odcService.scanMaven(groupId, artifactId, version))
|
||||
val depType = (xml \ "type").text
|
||||
Left(odcService.scanMaven(groupId, artifactId, version, depType))
|
||||
case other =>
|
||||
Right(s"Unknown root XML element: $other")
|
||||
}
|
||||
@@ -68,7 +69,7 @@ class LibraryAdvisor @Inject() (
|
||||
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic/0.9.10
|
||||
url.getPath.split('/') match {
|
||||
case Array("", "artifact", groupId, artifactId, version) =>
|
||||
Left(odcService.scanMaven(groupId, artifactId, version))
|
||||
Left(odcService.scanMaven(groupId, artifactId, version, ""))
|
||||
case _ =>
|
||||
Right("Unknown path for mvnrepository.com: Expected https://mvnrepository.com/artifact/<groupId>/<artifactId>/<version>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user