我工作的基础Maven的Android项目。我需要所有的罐子库的文件夹添加到本地Maven仓库,因为很多罐子不可成行家中央存储库。对于这个我将用我的问题下面commands.But是如何从任何外部JAR获得组ID,神器-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
s没有一个工件ID。你给他们一个同时mvn install
ing。例如,让我们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
然后,在使用中你的项目,你需要添加与该信息相关性。
我创建了一个脚本,可以帮助你建立的pom.xml依赖标签,如果你有一个完整的罐子的文件夹中。
为了发现这些信息的脚本执行以下操作:
你可以在这里得到它:https://github.com/sjbotha/make-pom/