gpt4 book ai didi

android - 如何知道maven android项目中任何外部jar的groupid和artifactid

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:21:30 28 4
gpt4 key购买 nike

我正在开发基于 maven 的 android 项目。我需要将 libs 文件夹的所有 jars 文件添加到 maven 本地存储库中,因为许多 jar 在 maven 中央存储库中不可用。为此,我将使用以下命令。但我的问题是如何从任何外部 jar 获取组 ID、 Artifact ID。
假设我有 picasso.jar 在这种情况下我没有也知道版本。

 mvn install:install-file
-Dfile=<path-to-file>
-DgroupId=<group-id>
-DartifactId=<artifact-id>
-Dversion=<version>
-Dpackaging=<packaging>
-DgeneratePom=true

Where:<path-to-file> the path to the file to load
<group-id> the group that the file should be registered under
<artifact-id> the artifact name for the file
<version> the version of the file
<packaging> the packaging of the file e.g. jar

请帮帮我。

提前致谢

最佳答案

.jar 没有 Artifact ID。您在 mvn install 时给他们一个。例如,让我们以 picasso.jar 为例:

mvn install:install-file
-Dfile=<path-to-your-picasso.jar>
-DgroupId='com.square'
-DartifactId='picasso'
-Dversion=<version-given-by-you-(better using original picasso.jar version)>
-Dpackaging=<packaging>
-DgeneratePom=true

然后在您的项目中使用时,您需要使用这些信息添加依赖项。

关于android - 如何知道maven android项目中任何外部jar的groupid和artifactid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25237875/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com