martes, 14 de diciembre de 2010

What if... I create a Maven web application and Tomcat doesn't see it?

Content:

Maven abstract.
Tunning your Maven proyect
Maven standard folders
Managing dependencies with Maven
Adding a nature in Eclipse
Maven profiles inheritance

It's hard for me to replay this error in my well configured computer :P, but I found something useful.

You need to add a "Dynamic Web Module" in Project "Properties" -> "Project Facets".
Then F5 and try to "Run as.. Run on Server".

If I create a Maven Web Project (maven-archetype-webapp in the second configuration window on "New Maven Project", I can read inside my .project file:


<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature> 
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>


As said in this web, if I delete the bold line, the option of running on server dissappears, so, it could be a nice clue.

If I try to read active facets in the "Project Facets" property page, I find this:

"This project is not configured to use project facets. Converting this project to faceted form will allow you to easily control the available technologies."

If I accept its proposal, then the bold line reappears! Mmmmm, interesting, isn't it?

That information is coded in ".settings/org.eclipse.wst.common.project.facet.core.xml"

Face and Unface "Dynamic Web Module" and check that file out to find how it works.


Have a nice day   :)

No hay comentarios:

Publicar un comentario

Nota: solo los miembros de este blog pueden publicar comentarios.