Running Vaadin/Spring application with Maven structure?

I’m trying to run the following project(Vaadin with Spring security) from Eclipse:

Vaadin App with Spring Security


Related article(Spring Integration)

I’ve tried to run it using the Maven goals ‘package’ ‘jetty:run’ as described in this article:

Using Vaadin with Maven

…but I get this error during the build:

[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD FAILURE
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time: 2.968s
[INFO]
 Finished at: Fri Feb 04 11:36:07 CST 2011
[INFO]
 Final Memory: 10M/116M
[INFO]
 ------------------------------------------------------------------------
[ERROR]
 No plugin found for prefix ''jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]
 available from the repositories [local (C:\Users\Adam\.m2\repository), terracotta-repository (http://www.terracotta.org/download/reflector/maven2), central (http://repo1.maven.org/maven2)]
 -> [Help 1]

[ERROR]
 
[ERROR]
 To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR]
 Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
 
[ERROR]
 For more information about the errors and possible solutions, please read the following articles:
[ERROR]
 [Help 1]
 http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

What am I doing wrong? One thing that may be important here is that I just imported the project using the Maven Eclipse plugin without declaring an archetype… do you need to do this if you’re just importing a project and not writing one from scratch?

Also, is it possible to simple deploy a Vaadin project with a Maven file structure to Eclipse’s Tomcat server? I’ve been doing this with other Vaadin projects with no problem.

Please forgive my ignorance. I’m new to both Spring and Maven. I’m just trying to get a simple example working with Vaadin and Spring successfully integrated.

I cannot recall how it was with that sample project, I haven’t used it for a long time. I think it was supposed to be possible to use Jetty with it without any additional configuration.

Anyway, you could try to create a new project from one of the Vaadin archetypes and then copy the Jetty plugin section from the created POM to your POM.

I believe it would be easier to copy the Tomcat definitions from a sample POM (e.g. one created with a Vaadin archetype if I remember correctly) to your POM and then select Debug As → Maven build… → goal tomcat:run (IIRC) to debug a Tomcat instance started by Maven inside Eclipse.

It should also be possible to deploy from Maven to the Eclipse internal Tomcat, but I think that is a little bit more complicated.

Henri,

Thanks for your response. For now I’m going a different route and manually managing dependencies instead of using Maven, which is working decently. When I start using best practices, I’ll refer back to this.

Thanks again.

Had the same issue, fixed it by specifying the production-mode profile:

mvn jetty:run -P production-mode