1

I created a vaadin project using eclipse as maven project with archetype vaadin-archetype-clean

I can run the project with mvn package jetty:run. I also defined a tomcat server within eclipse.

How can I achieve to run the proejct by right click > run as > on server? There is no menu entry for running the project on a local tomcat or whatever server.

membersound
  • 81,582
  • 193
  • 585
  • 1,120
  • You can run maven project in Tomcat, see next article: http://stackoverflow.com/questions/921380/how-to-run-a-maven-project-in-tomcat-from-eclipse – mortihead Jul 30 '13 at 05:09

2 Answers2

6

You can use tomcat7-maven-plugin:

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>${tomcat.plugin.version}</version>
    <configuration>
            <url>http://localhost:8080/manager/html</url>
            <username>admin</username>
            <password>pass</password>
            <path>/App</path>
            <update>true</update>
    </configuration>
</plugin>

IMO, this is cleaner than using Eclipse to manage your runtime (since in this case you will likely need to add facets to your maven project). Difference from "Run As -> Run on server" will be just creation of additional run configuration which will execute mvn clean package tomcat:redeploy. Almost same as using jetty plugin.

Sergey Makarov
  • 2,491
  • 2
  • 19
  • 23
0

Install the latest version of WTP plugin for eclipse and add the tomcat server to your runtime. If you installed the vaadin plugin for excel you can also specify the server in the project wizard.