Eclipse WTP,maven和m2eclipse - 不复制提供的jar [英] Eclipse WTP, maven and m2eclipse - not copying provided jars

查看:105
本文介绍了Eclipse WTP,maven和m2eclipse - 不复制提供的jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Eclipse WTP和m2eclipse可以将所有依赖关系复制到WEB-INF / lib(通过在部署程序集中添加maven依赖关系)。但是,还提供了提供范围的依赖关系,例如el-api和jsp-api。这个打扰了容器,它无法启动。

When using Eclipse WTP and m2eclipse it is possible to copy all dependencies to WEB-INF/lib (by adding "maven dependencies" in the Deployment assembly). However, dependencies with scope "provided" are also copied, for example el-api and jsp-api. That disturbs the container and it fails to start.

任何不复制提供jar的解决方案?

Any solution for not copying the "provided" jars?

推荐答案

您必须安装m2eclipse 的额外插件 m2eclipse-wtp 。将为你做这项工作。安装m2eclipse-wtp后,右键单击 project ---> Maven - >更新项目配置,您将发现所提供的范围的lib不再被信任给WTP容器。

You have to install the m2eclipse-wtp which is an extra plug-in for m2eclipse .It will do this job for you. After installing the m2eclipse-wtp , just right-click project ---> Maven --> Update Project Configuration , you will find that the libs of the provided scope will not be distrusted to the WTP container anymore.

请参阅这个的安装说明。我建议安装最新版本的m2eclipse-wtp(针对Eclipse 3.6 +进行测试),因为它解决了以前版本中的一些主要错误。

See this for the installation instruction. I would suggest to install the latest version of m2eclipse-wtp (tested against Eclipse 3.6 +) as it solves some major bugs in the previous versions.

编辑:谢谢Fred修正

Thanks Fred for the correction

这篇关于Eclipse WTP,maven和m2eclipse - 不复制提供的jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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