从Eclipse导出后,WAR-File中缺少一些必要的库 - 为什么? [英] Some necessary libraries are missing in WAR-File after export from Eclipse - why?

查看:195
本文介绍了从Eclipse导出后,WAR-File中缺少一些必要的库 - 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我接管了一个包含一些Web服务的大学项目,并通过将项目导出为WAR文件,一些库包含在文件中(例如Axis2),而另一些则不包含(hibernate,JDBC驱动程序)。此外,尚未导出添加到类路径的jar。所有库都位于硬盘驱动器上的文件夹中,这意味着它们不在eclipse文件夹中的某个位置。
如果我在使用WinRAR导出后打开WAR文件并手动将库添加到文件中,Web服务将运行良好,但这不是一个好的解决方案......
这个问题可能是什么原因?我该如何解决呢?

I took over a project of a college which contains some web services and by exporting the project as WAR-file some libraries are contained in the file (e.g. Axis2) and some aren’t (hibernate, JDBC driver). Also a jar which is added to the class path has not been exported. All libraries are located in folders on the hard drive which means that they are not in located somewhere in the eclipse folder. If I open the WAR-file after export with WinRAR and add the libraries manually to the file the web service will work well but that is not a good solution… What could be the reason for that problem? And how can I solve it?

推荐答案

Eclipse的jar依赖项包含在未放入WEB-INF /的war文件中lib是由通常的项目导出/导入管理,而是由动态Web项目的首选项中的单独面板(3.6:部署程序集,3.5:Java EE模块依赖项)管理。

The jar dependencies for Eclipse to include in a war file not placed in WEB-INF/lib is not managed by the usual "project export/imports" but by a separate panel (3.6: Deployment Assembly, 3.5: Java EE Module Dependencies) in the preferences of the dynamic web project.

这篇关于从Eclipse导出后,WAR-File中缺少一些必要的库 - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆