简体   繁体   English

如何将外部jar文件添加到Maven

[英]How to add external jar files to maven

如何使用Eclipse M2插件将外部jar文件添加到Maven Web应用程序项目中?

The most correct way is probably to install them to the repo. 最正确的方法可能是将它们安装到仓库中。

However, for an alternate, see the top answer to: 但是,对于其他方法,请参见以下最佳答案:

Can I add jars to maven 2 build classpath without installing them? 是否可以在不安装jar的情况下将jar添加到maven 2 build classpath?

You want to use mvn install:install-file. 您要使用mvn install:install-file。 See here for the instructions in the Maven guide: 有关Maven指南中的说明,请参见此处:

http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

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

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