IDE Support for Wicket development
Table of Contents
Wicket Plugins
For all leading IDE’s support is under development. Here’s a list of efforts for the major IDE’s.
- Eclipse: Qwickie, Wicket Source
- Netbeans: NB Wicket Support, Wicket Source
- IntelliJ IDEA: Wicket Forge, Wicket Source
These projects are not maintained or supported by the core Wicket team, but by their respective development teams.
Setting up your IDE
Eclipse
Eclipse offers a good support for Maven based projects with plugin M2Eclipse. Once installed you can go to ‘Import…->Existing Maven Projects’ and import one or more Maven projects into your workspace.
Alternatively, you can generate an Eclipse project typing the following command on project’s root:
mvn eclipse:eclipse
Maven will add all the necessary JAR files to the project’s classpath. Now the sources can be imported in Eclipse using the “Existing Projects into Workspace” wizard.
If not already present the M2_REPO
classpath variable has to point to your local Maven repository.
The repository is typically found in C:\Documents and Settings\<username>\.m2\repo
or (for unix buffs) ~/.m2/repo
. It can be set within Eclipse (Preferences->Java->Build Path->Classpath Variables) or with the help of Maven:
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
If you want to go along with the Wicket way of code formatting you should import the Wicket code format profile into your workspace (Preferences->Java->Code Style->Formatter), found in:
<path-to-eclipse-workspace>/wicket-core/EclipseCodeFormat.xml
Finally configure the editor to automatically format all edited lines and organize imports on save (Preferences->Java->Editor->Save Actions).
NetBeans
NetBeans comes with Maven integration. Further help can be found at their Wiki
IDEA
IntelliJ IDEA comes with Maven support too.
With the Eclipse Code Formatter plugin the Wicket format profile can be used in IntelliJ IDEA too. Configure the IDE to prevent star imports (Settings->Code Style->Imports).