[英]How to make Maven download only the POM files for all (transitive) dependencies?
I'm currently using the maven-dependency-plugin like我目前正在使用maven-dependency-plugin 之类的
mvn -B dependency:copy-dependencies \
-Dmdep.copyPom=true \
-DoutputDirectory="$OUTDIR"
to download all POMs of all (transitive) dependencies.下载所有(传递)依赖项的所有 POM。 However, that is also downloading the JARs, which I don't want.
但是,这也会下载我不想要的 JAR。 I tried to use
includeTypes
/ excludeTypes
to limit to POM files only, but that didn't work as nothing is retrieved then.我尝试使用
includeTypes
/ excludeTypes
来限制 POM 文件,但这不起作用,因为当时没有检索到任何内容。
Is there another option / command that really just retrieves the POMs?是否有另一个选项/命令真的只是检索 POM?
Background: I only need the meta-data from all transitive POMs for compliance checks.背景:我只需要来自所有可传递 POM 的元数据来进行合规性检查。
I ended up creating an Open Source project that downloads and gathers meta-data from Maven builds, and actually several other build systems , too.我最终创建了一个开源项目,该项目从 Maven 构建以及其他几个构建系统下载和收集元数据。 It's called OSS Review Toolkit (ORT for short) and programmatically uses the maven-resolver library to download only the POMs to analyze their contained meta-data.
它被称为OSS Review Toolkit (简称 ORT),并以编程方式使用maven-resolver库仅下载 POM 以分析其包含的元数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.