问题描述
我试图在另一个Web项目中使用一个名为搜索"的Java项目.我将Search项目导出为jar文件,并将其添加到Web项目的WEB-INF/lib文件夹中.问题是Search项目对Accumulo,Hadoop,Zookeeper等具有许多依赖关系.因此,如何将这些maven依赖关系/jar文件从Search项目复制到Web应用程序的WEB-INF/lib文件夹中,这样我就可以正常工作?
I am trying to use a Java project called "Search" in my another Web project. I exported the Search project as a jar and added to my Web project's WEB-INF/lib folder. The problem is that the Search projects has many dependencies for Accumulo, Hadoop, Zookeeper etc. So how can I copy these maven dependencies/jar files from the Search project to my Web apps' WEB-INF/lib folder so I can get everything working?
推荐答案
由于您正在使用Maven,因此您所要做的就是将"Search"项目添加为依赖性到您的Web项目.Maven会解决任何传递性依赖项,例如Accumolo,Hadoop,Zookeper等自动为您服务.
Since you are using Maven, all you need to do is to add the "Search" project as a dependency to your Web project. Maven will resolve any transitive dependencies like Accumolo, Hadoop, Zookeper, etc, automatically for you.
这篇关于如何将Maven依赖项(jar文件)从一个Java项目复制到另一个Dynamic Web项目的WEB-INF/lib文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!