blob: 75e16341a9681fa11310d723b11b3834e34574d1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<title>IDE Support for Wicket development | Apache Wicket</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body class="">
<div class="header default">
<div class="l-container">
<nav class="mainmenu">
<ul>
<!-- /start/quickstart.html || /contribute/ides -->
<li class=""><a href="/start/quickstart.html">Quick Start</a></li>
<!-- /start/download.html || /contribute/ides -->
<li class=""><a href="/start/download.html">Download</a></li>
<!-- /learn || /contribute/ides -->
<li class=""><a href="/learn">Documentation</a></li>
<!-- /help || /contribute/ides -->
<li class=""><a href="/help">Support</a></li>
<!-- /contribute || /contribute/ides -->
<li class=""><a href="/contribute">Contribute</a></li>
<!-- /community || /contribute/ides -->
<li class=""><a href="/community">Community</a></li>
<!-- /apache || /contribute/ides -->
<li class=""><a href="/apache">Apache</a></li>
</ul>
</nav>
<div class="logo">
<a href="/"><img src="/img/logo-apachewicket.svg" alt="Apache Wicket"></a>
</div>
</div>
</div>
<main>
<div class="l-container">
<header class="l-full preamble">
<h1>IDE Support for Wicket development</h1>
</header>
<section class="toc left">
<div id="toc" class="toc"><div id="toc-title"><h2>Table of Contents</h2></div><ul><li class="toc--level-1 toc--section-1"><a href="#wicket-plugins"><span class="toc-number">1</span> <span class="toc-text">Wicket Plugins</span></a></li><li class="toc--level-1 toc--section-2"><a href="#setting-up-your-ide"><span class="toc-number">2</span> <span class="toc-text">Setting up your IDE</span></a><ul><li class="toc--level-2 toc--section-3"><a href="#eclipse"><span class="toc-number">2.1</span> <span class="toc-text">Eclipse</span></a></li><li class="toc--level-2 toc--section-4"><a href="#netbeans"><span class="toc-number">2.2</span> <span class="toc-text">NetBeans</span></a></li><li class="toc--level-2 toc--section-5"><a href="#idea"><span class="toc-number">2.3</span> <span class="toc-text">IDEA</span></a></li></ul></li></ul></div>
</section>
<section>
<h2 id="wicket-plugins">Wicket Plugins</h2>
<p>For all leading IDE’s support is under development. Here’s a list of efforts
for the major IDE’s.</p>
<ul>
<li>Eclipse: <a href="http://code.google.com/p/qwickie">Qwickie</a>, <a href="https://github.com/jennybrown8/wicket-source">Wicket Source</a></li>
<li>Netbeans: <a href="http://plugins.netbeans.org/plugin/3586/wicket-1-4-support">NB Wicket Support</a>, <a href="https://github.com/JoachimRohde/NBWicketSourcePlugin">Wicket Source</a></li>
<li>IntelliJ IDEA: <a href="http://wicketforge.googlecode.com/">Wicket Forge</a>, <a href="https://github.com/armhold/wicket-source-intellij">Wicket Source</a></li>
</ul>
<p>These projects are not maintained or supported by the core Wicket team, but
by their respective development teams.</p>
<h2 id="setting-up-your-ide">Setting up your IDE</h2>
<h3 id="eclipse">Eclipse</h3>
<p>Eclipse offers a good support for Maven based projects with <a href="http://www.eclipse.org/m2e/">plugin M2Eclipse</a>. Once installed you can go to ‘Import…-&gt;Existing Maven Projects’ and import one or more Maven projects into your workspace.</p>
<p>Alternatively, you can generate an Eclipse project typing the following command on project’s root:</p>
<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="go">mvn eclipse:eclipse</span></code></pre></figure>
<p>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.</p>
<p>If not already present the <code class="language-plaintext highlighter-rouge">M2_REPO</code> classpath variable has to point to your local Maven repository.
The repository is typically found in <code class="language-plaintext highlighter-rouge">C:\Documents and Settings\&lt;username&gt;\.m2\repo</code> or (for unix buffs) <code class="language-plaintext highlighter-rouge">~/.m2/repo</code>. It can be set within Eclipse (Preferences-&gt;Java-&gt;Build Path-&gt;Classpath Variables) or with the help of Maven:</p>
<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="gp">mvn -Declipse.workspace=&lt;path-to-eclipse-workspace&gt;</span><span class="w"> </span>eclipse:add-maven-repo</code></pre></figure>
<p>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-&gt;Java-&gt;Code Style-&gt;Formatter), found in:</p>
<figure class="highlight"><pre><code class="language-console" data-lang="console"><span class="gp">&lt;path-to-eclipse-workspace&gt;</span>/wicket-core/EclipseCodeFormat.xml</code></pre></figure>
<p>Finally configure the editor to automatically format all edited lines and organize imports on save (Preferences-&gt;Java-&gt;Editor-&gt;Save Actions).</p>
<h3 id="netbeans">NetBeans</h3>
<p>NetBeans comes with Maven integration. Further help can be found at their <a href="http://wiki.netbeans.org/MavenBestPractices" title="NetBeans Community Wiki">Wiki</a></p>
<h3 id="idea">IDEA</h3>
<p>IntelliJ IDEA comes with <a href="http://www.jetbrains.com/idea/webhelp/maven.html" title="IDEA Web Help">Maven support</a> too.</p>
<p>With the <a href="http://plugins.jetbrains.com/plugin/6546">Eclipse Code Formatter plugin</a> the Wicket format profile can be used in IntelliJ IDEA too. Configure the IDE to prevent star imports (Settings-&gt;Code Style-&gt;Imports).</p>
</section>
</div>
</main>
<footer>
<div class="l-container">
<div class="left">
<img src="/img/asf_logo_url.svg" style="height:90px; float:left; margin-right:10px;">
<div style="margin-top:12px;">Copyright © 2020 — The Apache Software Foundation. Apache Wicket, Wicket, Apache, the Apache feather logo, and the Apache Wicket project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</div>
</div>
</div>
</footer>
</body>
</html>