Eclipse and the verge

In java courses, everyone (or at least most people) seems to have a working eclipse. They always had a working face - config (visual) and auto-completion in xhtml files (for facelets). Although for autocompletion, we added * .xhtml files to the JSP.

It seems that this was the part that I do not know very well about the eclipse, and it is rather annoying, since I do not know why. When I import a project (either Maven or an existing one), it always has no facets except java (and this is not even 1.6 in 1.5), while it should be a web project and have chips and a dynamic web project.

Can I change these faces? It seems that it just works when I install java on 1.6, but try to edit the version of the dynamic web module from 2.4 to 2.5 (standard on 2.4) without encountering some problems. Even after I just created a new maven project (with an archive on the command line), I cannot change these faces much.

What am I doing wrong?

+7
source share
4 answers

Eclipse functionality is driven by project metadata. If you do not have the correct metadata, the projects will not behave correctly.

If you are starting from scratch and creating projects in Eclipse, be sure to place all the metadata files in your version control system (including everything in the [project] /. Settings directory).

If you are using Maven to create Eclipse project metadata, make sure you find the Maven plugin that knows about WTP. I do not have a link, but I know that it exists. This ensures that when Maven generates metadata, it will have the correct metadata for web projects.

Can I change these faces? It seems to just work when I put java on 1.6, but trying to edit the dynamic web module version 2.4 to 2.5 (this is the standard on 2.4) without encountering some problems.

The principle of the facet is that the facet author can choose not to implement the logic of changing the version. Unfortunately, Java EE facsimile modules (e.g. dynamic web module) do not have a version change. Other aspects, such as Java, support this. Thus, your experience will vary from facet to facet.

If all else fails, you can edit the .settings / org.eclipse.wst.common.project.facet.core.xml file manually. Be sure to do this from Eclipse, or you will need to update the project after that. Just keep in mind that if you force changes in this way, you may need to make some manual corrections to your project content. For example, if you change the level of web specification, you may need to update deployment descriptors.

+10
source

You can change the face of the project. You must close eclipse, then go to the .settings directory, the org.eclipse.wst.common.project.facet.core.xml file contains all the information related to the face. You can add or remove a project face.

+5
source

for eclipse

Right click on the projec t and select properties from the menu that appears

In the left part of the opening window there is a list. Select project facets , and you will see all the available faces that you can select, and adjust their settings.

+4
source

I recently upgraded an old project to Java8 / Eclipse 4.6.1, and also ran into a facet version issue. To get the menu indicated by @fmucar (which was not available in the Eclipse package for RCP and RAP Developers that I installed), I needed to install “Install New Software” from the “Help” menu and select to add the Faceted Project Framework. Then I was able to select the facet version from the IDE.

+1
source

All Articles