blob: 6ee4fab324a01826495bccf1e0f62b75265ba397 [file] [log] [blame]
I"t<script type="text/javascript" charset="utf-8" src="/javascript/ZeroClipboard-1.1.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
ZeroClipboard.setDefaults( { moviePath: '/javascript/ZeroClipboard-1.1.7.swf' } );
var clip = new ZeroClipboard(document.getElementById("cmdLineCopy"));
clip.on( 'noflash', function ( client, args ) {
document.getElementById("cmdLineCopy").style.display = 'none';
});
clip.on( 'wrongflash', function ( client, args ) {
document.getElementById("cmdLineCopy").style.display = 'none';
});
$(document).resize(function() {
clip.reposition();
});
});
function changeIt()
{
var groupId = document.getElementById("groupId").value;
var artifactId = document.getElementById("artifactId").value;
var version = document.getElementById("version").value;
var appserver = document.getElementById("appserver").value;
var cmd;
if(version.match(/^1\.[34]/))
cmd = 'mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=' + version + ' -DgroupId=' + groupId + ' -DartifactId=' + artifactId;
else if(version.match(/.*SNAPSHOT/))
cmd = 'mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=' + version + ' -DgroupId=' + groupId + ' -DartifactId=' + artifactId;
else
cmd = 'mvn archetype:generate -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=' + version + ' -DgroupId=' + groupId + ' -DartifactId=' + artifactId;
if (version.match(/.*SNAPSHOT/))
cmd += ' -DarchetypeRepository=https://repository.apache.org/content/repositories/snapshots/';
else
cmd += ' -DarchetypeRepository=https://repository.apache.org/';
if (appserver === 'wildfly')
cmd += ' -Dlog4j.properties=wildfly-doesnt-need-log4j.properties';
cmd += ' -DinteractiveMode=false';
document.getElementById("cmdLine").value = cmd;
}
</script>
<h2 id="before-you-start">Before you start</h2>
<p>The Quick Start Wizard uses <a href="http://maven.apache.org">Apache Maven</a> to
make it really fast to get started. You should have Maven installed and
working before you can use the Quick Start wizard.</p>
<h2 id="5-small-steps-to-a-web-application">5 small steps to a web application</h2>
<p>Use the following steps to quickly generate a project to get you
started:</p>
<ol>
<li>Fill in the Maven coordinates for your project in the wizard and
select the appropriate Wicket version</li>
<li>Copy the generated commandline to your clipboard and paste it in a
terminal (or a DOS box)</li>
<li>Open the project in your IDE of choice</li>
<li>Start the <code class="language-plaintext highlighter-rouge">Start</code> class in the <em>src/test/java</em> folder</li>
<li>Open your browser to <a target="_blank" href="http://localhost:8080">http://localhost:8080</a></li>
</ol>
<p>And youre done!</p>
<h2 id="quick-start-wizard">Quick Start Wizard</h2>
<p>Fill in your project details in the wizard below and copy the generated
command line to your clipboard.</p>
<div class="quickstart-wizard">
<div>
<label title="Base Package" for="groupId">Group ID</label>
<input type="text" value="com.mycompany" onkeyup="changeIt();" id="groupId" />
</div>
<div>
<label title="Project Name" for="artifactId">Artifact ID</label>
<input type="text" value="myproject" onkeyup="changeIt();" id="artifactId" />
</div>
<div>
<label title="Wicket Version" for="version">Wicket Version</label>
<select onchange="changeIt();" id="version">
<option value="9.0.0-M6-SNAPSHOT">9.0.0-M6-SNAPSHOT</option>
<option value="8.9.0-SNAPSHOT">8.9.0-SNAPSHOT</option>
<option value="7.17.0-SNAPSHOT">7.17.0-SNAPSHOT</option>
<option value="6.31.0-SNAPSHOT">6.31.0-SNAPSHOT</option>
<option value="1.5-SNAPSHOT">1.5-SNAPSHOT</option>
<option value="9.0.0-M5">9.0.0-M5</option>
<option value="8.8.0" selected="selected">8.8.0</option>
<option value="7.16.0">7.16.0</option>
<option value="1.4.23">1.4.23</option>
<option value="1.5.16">1.5.16</option>
<option value="6.30.0">6.30.0</option>
</select>
</div>
<div>
<label for="appserver" title="Server to deploy on">Server to deploy on</label>
<select id="appserver" onchange="changeIt();">
<option value="any" selected="selected">Any but Wild Fly</option>
<option value="wildfly">Wild Fly (JBoss 8.x)</option>
</select>
</div>
<div>
<label id="cmdLabel" for="cmdLine">generated command line</label>
<textarea onfocus="this.select();" id="cmdLine" style="resize: vertical;"></textarea>
<script>changeIt();</script>
</div>
<div>
<button data-clipboard-target="cmdLine" class="clip_button" id="cmdLineCopy">copy to clipboard</button>
</div>
</div>
<p><br /></p>
<p>With the generated command line on your clipboard open up a terminal
window (or DOS box) and navigate to where you want the project to be
generated (e.g. for Eclipse users this would be your workspace folder).
Paste the command line into your terminal window and press «enter» to
execute the command.</p>
<h4 id="result-of-the-maven-command">Result of the Maven command</h4>
<p>Executing the Maven command line will result the following directory
structure:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>.\myproject
| pom.xml
|
\---src
+---main
| +---java
| | \---com
| | \---mycompany
| | HomePage.html
| | HomePage.java
| | WicketApplication.java
| |
| +---resources
| | log4j.properties
| |
| \---webapp
| \---WEB-INF
| web.xml
|
\---test
\---java
\---com
\---mycompany
Start.java
</code></pre></div></div>
<p>It might be different depending on your settings (and version of
Wicket), but this is basically the standard layout for web projects.</p>
<h2 id="import-the-quick-start-in-your-ide">Import the Quick Start in your IDE</h2>
<p>The Wicket Quick Start uses Apache Maven to make it really fast to get
started. You should have Maven installed and working before you can use
the Quick Start wizard.</p>
<h3 id="eclipse">Eclipse</h3>
<p>For Eclipse you should generate the Quick Start project within your
workspace folder. You also need to ensure that you have m2eclipse
installed in order to import the project. To import the project you
select Import existing project from the File menu, and select the
folder of your generated Quick Start project.</p>
<h3 id="intellij-idea">IntelliJ IDEA</h3>
<p>IntelliJ IDEA has native support for Maven projects. You just point the
open project dialog to the place where you generated the Quick Start
project and open the pom.xml file. IDEA will then open the project as
any other Java project.</p>
<h3 id="netbeans">Netbeans</h3>
<p>Netbeans has native support for Maven projects. You just point the open
project dialog to the place where you generated the Quick Start project
and open the pom.xml file. Netbeans will then open the project as any
other Java project.</p>
:ET