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

标签 android maven

我正在开发基于 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/

相关文章:

android - 为 Android Room 运行测试时出现 java.lang.NoClassDefFoundError

android - 半透明状态栏错误

java - jspc-maven-plugin 由于缺少类而无法编译

Maven忽略执行配置

java - 未找到具有 URI 的 HTTP 请求的映射(spring 4.1 注释配置)

java - 有没有办法在执行 "Maven Deploy"时运行java代码?

maven 设置自定义属性

android - 如何滚动屏幕(我的意思是如何移动屏幕)

android - Cordova | ERR_FILE_NOT_FOUND(文件 :///android_assets/www/index. html)

AndroidStudio gradle 构建锁定在 :app:compileDebugJavaWithJavac using Room