Eclipse: Server Run option not showing for maven project

I run the manual for jboss as7 here http://hudson.jboss.org/jenkins/job/JBoss-AS7-Docs/lastSuccessfulBuild/artifact/guides/developer-getting-started-guide/target/docbook/publish/en-US /html/helloworld.html . In the tutorial, we created a quickstart maven helloworld project example.

I can successfully run this project from the command line

mvn package jboss-as:deploy 

but when I try to deploy the helloworld example from Eclipse, the run on server option is missing from the start menu. I have Eclipse 3.7 and maven wtp installed.

Not sure how to fix, any advice appreciated.

+7
source share
5 answers

The related run on server parameters are only displayed if your project has a Dynamic Web Moudle project facet.

You can try to configure it using the Project Facets options in the project properties.

enter image description here

+32
source

To help any other developer with this problem.

I recently addressed this issue. Maven projects are structured differently than Dynamic Web Projects. Therefore, when you manually add a dynamic web module using Fac Facets, eclipse may not register it properly as a Maven project.

To solve this problem, you need to install the m2e plugin and M2E Eclipse WTP (this tells Eclipse how to run your maven projects).

Go to Help β†’ Eclipse Marketplace to find plugins.

After installation, you will need to restart Eclipse and you will be able to use "run on server" for your Maven projects.

Note. You may need to delete / delete the previous project, and then import / create it again after restarting.

+6
source

You must add the maven eclipse pluginin to your pom.xml file ..

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.9</version> </plugin> 
+2
source

According to Red Hat, the M2E Eclipse WTP plugin (m2eclipse-wtp) is deprecated in favor of the new m2e-wtp plugin. If you do not want to go through the market, the URL of the new plugin is http://download.eclipse.org/technology/m2e/releases .

0
source

After copying the project and updating, closing and re-adding it, deleting and re-adding it (right-click on the server) and update Maven ... this option appeared again. I think this happens when you use the Java compiler version in your .pom file, when you use the compiler in the project properties, or when it involves using the new version of Jersey (2), or when you both include local libraries and maven dependencies, this may also be due to their combination. This is pretty obscure. Note that you can still add / remove projects by right-clicking on the server in the servers tab.

0
source

All Articles