Eclipse Faces配置编辑器不工作 [英] Eclipse Faces Config Editor not working

查看:118
本文介绍了Eclipse Faces配置编辑器不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

摘要



编辑faces-config.xml时,Eclipse中的Faces配置编辑器不会打开。这是一个JavaServer Faces项目。



详细信息

Eclipse 3.7.2



Eclipse m2e 1.0.1



m2e-wtp插件0.15



我已经看过这个问题(如何激活在Eclipse中面临配置编辑器),但是当我将Faces facet添加到我的项目中时,它不再编译。
可能是因为我导入了Maven项目,而不是使用Eclipse WTP项目创建向导。我有Maven目录结构(我喜欢,不想改变)。



问题是,当我在这个项目中打开faces-config.xml Faces配置编辑器不启动,所以我必须使用纯XML进行编辑。这不是世界上最糟糕的事情,但如果有一个解决方案,我想知道的。



谢谢!
Alex



编辑



由于没有人回答这个问题,也许我需要提供更多的信息。



面孔配置编辑器 工作时间:




  • 使用项目创建向导创建动态Web项目

  • 导入现有的Maven项目,然后添加JSF Facet(但在这种情况下,该项目不再编译,因为Eclipse找不到Maven依赖项)



面孔配置编辑器工作时:




  • 导入现有的Maven项目,如果我不添加JSF Facet



我意识到一个选择是:


  1. 导入现有的Maven项目

  2. 添加JSF Facet

  3. 将Maven添加到部署程序集

但是,此解决方案的问题是每次更新项目配置(从Maven)Maven需要再次添加到部署程序集( Eclipse + Maven + Dynamic Web Project - > Maven覆盖部署组件)。这就是为什么我使用m2e-wtp Eclipse插件。它允许我使用默认的Maven项目结构,使用Eclipse,并摆脱不必要的魔术。



我唯一的问题是这个Faces Config Editor的东西。 / p>

对于详细程度,对不起



解决方案



这是一个愚蠢的错误和一个简单的修复。当将JavaServer Faces构面添加到我的项目中时,因为它打破了构建,这只是因为Eclipse试图将JSF(MyFaces)添加到我的构建路径,而且我已经通过Maven使用了MyFaces,从而导致了冲突。解决方案是简单的,保持启用JavaServer Faces facet并从我的构建路径中删除Eclipse添加的JSF库。

解决方案

当向项目添加 JavaServer Faces facet 时,它将中断构建,因为Eclipse尝试添加 JSF(MyFaces)库到构建路径,这些已经通过 Maven 依赖关系存在,从而导致名称冲突。



解决方案:启用 JavaServer Faces facet (激活 Faces Config Editor ),并从构建路径中删除Eclipse添加的 JSF 库。


Summary

The Faces Config Editor in Eclipse does not open when editing faces-config.xml. This is in a JavaServer Faces project.

Details

Eclipse 3.7.2

Eclipse m2e 1.0.1

m2e-wtp plugin 0.15

I've seen this question already (How to activate Faces configuration editor in Eclipse?), but when I add the Faces facet to my project it no longer compiles. Probably because I imported a Maven project, rather than using the Eclipse WTP project creation wizard. I have the Maven directory structure (which I prefer, and do not wish to change).

The problem is, when I open faces-config.xml from within this project the Faces Config Editor doesn't start, so I have to edit it using plain XML. That's not the worst thing in the world... but if there's a solution I'd like to know about it.

Thanks! Alex

EDIT

As no one is answering this, maybe I need to provide more information.

Faces Config Editor does work when:

  • creating Dynamic Web Project using project creation wizard
  • importing existing Maven project, then adding the JSF Facet (but in this case the project no longer compiles, because Eclipse can't find the Maven dependencies)

Faces Config Editor does not work when:

  • importing existing Maven project, if I don't add the JSF Facet

I realize that one option is to:

  1. import an existing Maven project
  2. add the JSF Facet
  3. add Maven to Deployment Assembly

But the problem with this solution is every time I Update Project Configuration (from Maven) Maven needs to be added to the Deployment Assembly again (Eclipse + Maven + Dynamic Web Project -> Maven overwrites Deployment Assembly). This is why I use the m2e-wtp Eclipse plugin. It allows me to use the default Maven project structure, with Eclipse, and get rid of the unnecessary "magic".

My only problem is this Faces Config Editor thing.

Sorry for the verbosity

SOLUTION

it was a dumb mistake and a simple fix. when adding the JavaServer Faces facet to my project because it broke the build, this was just because Eclipse tried to add JSF (MyFaces) to my build path, and I already had MyFaces via Maven, which resulted in a conflict. The solution was dead simple, keep the JavaServer Faces facet enabled and remove the Eclipse-added JSF library from my build path.

解决方案

When adding the JavaServer Faces facet to the project, it breaks the build, because Eclipse tries to add JSF (MyFaces) libraries to the build path, and these already existed via Maven dependencies, resulting in name conflicts.

Solution: Enable the JavaServer Faces facet (to activate Faces Config Editor), and remove the Eclipse-added JSF libraries from the build path.

这篇关于Eclipse Faces配置编辑器不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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