简体   繁体   English

Netbeans8中的Maven:如何将jar添加到本地存储库

[英]Maven in Netbeans8: how to add jars to local repository

I use Maven bundled in NetBeans8. 我使用NetBeans8中捆绑的Maven。 I have a lot of Maven projects, but also a lot of jar files provided by third parties which are not available from any online Maven repository. 我有很多Maven项目,但是还有很多第三方提供的jar文件,这些文件从任何在线Maven存储库中都找不到。

I have to use these jars in one of my Maven projects. 我必须在我的Maven项目之一中使用这些jar。 I read in this SO answer that I should copy the jars in my local repository! 我在这个答案中读到,我应该将罐子复制到本地存储库中! How can I do that in NetBeans with my bundled Maven? 如何使用捆绑的Maven在NetBeans中做到这一点?

You can either do it from the command line as explained in your link. 您可以按照链接中的说明从命令行进行操作。 Maven is in netbeans installation folder/java/maven/bin/mvn.bat on Windows. Maven在Windows上的netbeans installation folder/java/maven/bin/mvn.bat中。 Not sure on other platform. 不确定在其他平台上。

Alternatively, you can expand your project's "Dependencies" folder, right click on the jar and select "Manually install artifact". 或者,您可以展开项目的“ Dependencies”文件夹,右键单击jar并选择“手动安装工件”。

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

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