繁体   English   中英

缺少对本地安装的 arifact 的 Maven 依赖

[英]Missing Maven Dependency on Locally installed atrifact

我有一个 .jar 文件,我想在我用 Maven 构建的当前项目中使用它。 经过一番研究,我发现我需要在本地安装它。 这是我使用的:

mvn install:install-file -Dfile="D:\Eclipse Workspace\TextOnlyJam\adapterLib\lwjgladapter.jar" -DgroupId=lwjgladapter -DartifactId=lwjgladapter -Dversion=1.0 -Dpackaging=jar`

然后我将依赖项添加到我的 pom 中,如下所示:

<dependency>
    <groupId>lwjgladapter</groupId>
    <artifactId>lwjgladapter</artifactId>
    <version>1.0</version>
</dependency>

我在 exclipse 中的项目现在设法解决所有依赖项,并且没有给我任何编译错误。 但是,在多次清理和更新我的 Maven 项目后,运行安装时仍然出现以下错误:

Failure to find lwjgladapter:lwjgladapter:jar:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

我假设 Maven 正在错误的位置寻找工件,但是我无法弄清楚我需要在这里更改什么。

(我也不确定是否需要将依赖项添加到 中,因为当我这样做时它似乎没有改变任何东西。)

好吧,我只是发现这只是我的一个愚蠢的错误。 我查看了存储库文件夹,发现我的 jar 文件名为“.jar”

所以是的,一个简单的复制和过去的错误。 感谢你目前的帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM