maven - maven-dependency-plugin 依赖:获取 AAR 依赖
问题描述
我想获取一个包含所有依赖项的 Maven 包。为此,我使用以下命令:
mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get \
--settings settings.xml \
-Dmaven.repo.local=/path/to/m2-repository \
-Dartifact=my.pkg.name:vers
我的 settings.xml 文件:
<settings>
<profiles>
<profile>
<id>global</id>
<repositories>
<repository>
<id>google</id>
<name>Google Maven</name>
<url>https://maven.google.com</url>
</repository>
<repository>
<id>jcenter</id>
<name>Jcenter</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>global</activeProfile>
</activeProfiles>
</settings>
如果依赖关系树中没有 aar 包,它可以正常工作,否则,对于每个 aar 包,我都会出现如下错误:
The following artifacts could not be resolved: <pkg-prefix>:<pkg-name>:jar:<pkg-version>
有一个插件可以管理 aar 和其他 android 存档格式(com.simligility.maven.plugins:android-maven-plugin),但我不知道如何使用它来执行与 maven 相同的事情-dependency-plugin 与 get 方法
解决方案
推荐阅读
- vba - 在 VBA 中比较日期时出现问题?
- java - GPIO - java.lang.NoSuchFieldError: device_reference
- python - 如何从python中的列表索引获取列表的子集
- html - 固定 div 不会忽略父 div 宽度/高度/位置约束
- css - 为什么在某些浏览器中img width的结果不同?谁是正确的?
- java - 我想从下拉列表中传递值的形式应该是什么 Spring Form 支持对象?
- javascript - 如何使用 jquery 和名称获取复选框的值?
- javascript - 如果文档被引用到 Mongodb 中的另一个文档,则永远不应删除该文档
- wordpress - Gutenberg setAttributes 没有更新我的编辑区域
- azure - Azure AD 注册应用程序未在同意屏幕上显示 ToS/隐私链接