Running Maven-based Wicket projects in Eclipse
After you have created a new Wicket project according to the Wicket QuickStart instructions, you might wonder how to setup and run the project in Eclipse. There are two ways:
Using m2eclipse and WTP
-
Install the Maven integration for Eclipse according to m2eclipse installation guide.
Maven Integration for EclipseandMaven Integration for WTPare essential, installing theMaven POM (XML) Editoris recommended. -
Import the project using
File > Import > Maven projects. -
Go to the Servers list (
Window > Show View > Servers) and add a new server. I’m usingTomcat 6.0, but any server type should be fine:
-
Specify the path to your server installation and add the project to the server configuration. You need to have the
Maven Integration for WTPplug-in installed, otherwise the project will not be available here:
-
You can run and debug the application from the servers view:

Manually without m2eclipse tooling
-
Create a new Eclipse configuration for your project using:
mvn eclipse:eclipse -DdownloadSources=true -
Go to
Preferences > Java > Build Path > Classpath Variablesand configure a variableM2_REPOpointing to the Maven repository (~/.m2/repository). -
Import the project using
File > Import > General > Existing Projects into Workspace. -
Your project should have a class
Startin the test source folder (this is created by the Wicket quickstart archetype). Run this as Java application to run and debug with an embedded Jetty server.