如何在pom.xml中将\ install添加到新创建的第三方jar的maven依赖项中 [英] How to add\install to maven dependency of newly created\third party jar in pom.xml

查看:125
本文介绍了如何在pom.xml中将\ install添加到新创建的第三方jar的maven依赖项中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于maven项目,我的代码需要一个Jar文件但不在maven存储库中,因此,我已经下载并在配置的远程存储库中添加了jar文件。

For a maven project a Jar file needed for my code but which is not in maven repository so, I have downloaded and added the jar file in configured remote repository.

我想添加jar的依赖项。所以我想知道

I want to add dependency of the jar. so i would like to know

<groupId>?</groupId>
<artifactId>?</artifactId>
<version>?</version>

此外,我想知道在哪里可以找到罐子里的这些细节

Also i like to know where i can find these details in the jar

推荐答案

您需要将此JAR安装到您自己的存储库中,请参阅此官方教程

You need to install this JAR into your own repository, see this official tutorial.

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

现在将这个已安装的工件作为常规依赖项包含在项目中。

Now include this installed artifact into your project as a regular dependency.

这篇关于如何在pom.xml中将\ install添加到新创建的第三方jar的maven依赖项中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆