- This topic has 6 replies, 3 voices, and was last updated 12 years, 9 months ago by support-tony.
-
AuthorPosts
-
Jan TichavaMemberWe are using embedded Jetty + JSF 2 + Primefaces 3 in one of our Java project, so common JAR is a result of this build. We had migrated from Eclipse projects to Maven and there is a problem with this particular project. Build is OK, works fine, but MyEclipse doesn’t know, that this is web project, so there is no autocomplete for JSF and Primefaces components and JSF Beans.
Is there a way, how to setup Maven project with embedded Jetty to work properly with MyEclipse including autocomplete?
Thanks.
support-swapnaModeratorjtichava ,
I have escalated it to a dev team member. They will get back to you.
support-tonyKeymasterjtichava,
If the maven project is a web project, it should have been recognized as such, on import. However, to get content assist on faces files, you will have to add web capability and jsf capability to the project. Right click on the project, go to the MyEclipse sub-menu and select Add Web Capabilities. If you don’t want the wizard to add anything to your project, you should be able to deselect most of the options, or later remove any files or dependencies that were added. Once you have web capabilities, use the same route to add JSF capabilities; again, you can avoid the wizard adding libraries to your project.
If this is not appropriate for your project please let us have more information about the project (such as how it was created and how it is structured, the pom might be useful). Also, please provide the MyEclipse installation details (to get these, go to MyEclipse->Installation Summary->Installation Details).
Please let us know how this works for you.
Jan TichavaMemberTony,
Thanks for quick answer.
It’s not web project. It’s Java project, because we’re using embedded Jetty, so, we build JAR archive and launch it as “common” Java application (with some class with main(…)).I figured out it before my first post: import Maven project, then add Web Project Capabilities, then JSF Capabilities and then revert changes from git and everything works fine, but I was hoping that there is a “clever” way how to do this. So, yes, your instructions work too.
Attachments:
You must be logged in to view attached files.
support-tonyKeymasterjtichava,
Thanks for getting back to us, and for the installation details. There is another way to do it. Right click on the project and select Properties. Go to “Project Facets”. If you see a link about converting to a faceted project, click it. Then you can add the facets “Dynamic Web Module” and “JavaServer Faces”. The latter has further configuration when first selected (a link at the bottom) but I don’t think you need that. Now click Apply or OK and you should be all set.
I hadn’t thought about this possibility before but it appears to work.
Jan TichavaMemberTony,
ok, thanks for help.
support-tonyKeymasterjtichava,
No problem, I’m glad to be of service.
-
AuthorPosts