2

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.

Community
  • 1
  • 1
Alex Averbuch
  • 3,127
  • 4
  • 30
  • 43
  • have you tried http://stackoverflow.com/a/8772861/617373 ? – Daniel Apr 04 '12 at 09:18
  • thanks but there are multiple problems with that solution: (1) it is not the same editor (2) i checked, and there is no official support for Indigo yet (3) most of all, that package is HUGE, I don't want to have to install all of that just for an editor – Alex Averbuch Apr 04 '12 at 12:48
  • even worse. I tried this, then found I didn't like the solution, so I uninstalled the plugin. but when uninstalling it half of my Eclipse directory was deleted, including the eclipse executable file. now I have to reinstall and reconfigure my Eclipse installation. very bad. not recommended. – Alex Averbuch Apr 04 '12 at 12:55
  • I use it on several eclipse IDE's and the rls that is out working just fine with the indigo... don't know what you have done... but you surely did something wrong... also you should have selecting only Web and Java EE Development for installing , Last thing you can find others in stack overflow recommending this plugin in other questions... – Daniel Apr 04 '12 at 12:56
  • "you have surely done something wrong" is not constructive, nor founded – Alex Averbuch Apr 04 '12 at 13:01
  • regarding "selecting only Web and Java EE Development", I went a step further. I selected only the "Richfaces" support from within "Web and Java EE Development". I did this because I don't require support for Hibernate, Seam, etc. at this stage. Possibly, the reason for this bug was due to only installing that component, rather than the entire "Web and Java EE Development" package, but that does not mean I "surely did something wrong". – Alex Averbuch Apr 04 '12 at 13:04
  • 1) never tried that "step further" always installed the whole "Web and Java EE Development" 2)Maybe Revert option of eclipse is better than uninstalling the plugin... (unless that what you did) – Daniel Apr 05 '12 at 09:49

1 Answers1

1

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.

Msonic
  • 1,448
  • 15
  • 25
Alex Averbuch
  • 3,127
  • 4
  • 30
  • 43