java 如何将外部jar文件添加到maven
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16020447/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to add external jar files to maven
提问by user2054833
How do I add external jar files to maven web app project using Eclipse M2 Plugin?
如何使用 Eclipse M2 插件将外部 jar 文件添加到 Maven Web 应用程序项目?
回答by Aurand
The most correct way is probably to install them to the repo.
最正确的方法可能是将它们安装到 repo 中。
However, for an alternate, see the top answer to:
但是,对于替代方案,请参阅以下问题的最佳答案:
Can I add jars to maven 2 build classpath without installing them?
回答by g051051
You want to use mvn install:install-file. See here for the instructions in the Maven guide:
您想使用 mvn install:install-file。请参阅此处了解 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