Eclipse Juno, a maven project that cannot work on the server

I upgraded to Eclipse Juno (for Java EE developers). I installed Maven Integration for Eclipse through the market.

Just to check, I created a web application using maven-archetype-webapp. I can’t work on the server (there is no "Run on server" menu). The same thing happens with another maven project that works fine using Eclipse Indigo . Tried to delete .settings, .classpath, .project, and then re-import the project, but nothing. I was so hoping for Juno !

Does anyone know a real solution to this problem?

+4
source share
4 answers

How about installing the m2e-wtp plugin and trying? You would like to confirm that the maven project has a war package.

+7
source

There may be a dynamic web module in the project factor not selected

Go to: - Project> Properties> Project boundaries> check dynamic web module

+10
source

Running on the server is not a maven function; it is a "classic eclipse."

To start the maven project on the server, you must accept the plugin (for example, the Jetty plug-in for your webapp) and run the correct maven target (for example, launch the pier).

Having said that, you can start the web project on the server with (right-click) > Run as > Run on server if you have the proper runtime configured.

+1
source

Enabling the Dynamic Web Module in Fac Facets may not help here in maven projects.

Because maven projects are structured differently (target / sampleApp-1.0-SNAPSHOT.war) than regular Dynamic web projects (WebContent /).

So, if you use the Dynamic Web Module manually, eclipse will try to use the "WebContent" directory structure as the deployment directory for the Application Server, which will not be the case in maven projects.

The solution is to use the m2e-wtp plugin for deployment.

If you installed the m2e-wtp plugin , it will automatically detect your maven project type and show you the Run as server option in the "Run as" section of the "Project" menu.

0
source

All Articles