the web page generates a command line to create a template project. By copying the command line and pasting it into a shell window you can have project with everything you need to create a simple Wicket application.
Figure 1 Wicket Quick Start Page
The way that this works is that they web page does the details work of helping you build the maven command line that downloads the “archetype” project from a repository. The archetype is basically a template project.
This process assumes that you have installed:
- A Web Browser
- A Java Compiler
This example relies on the Maven archetype mechanism to do most of the work, and the code to generate the command line simply saves you from copying and pasting.
And the archetype is just a template project with the default files in the default directory structure. But it is exactly this kind of automation that makes starting a new project simple and foolproof.
With the help of tooling that Maven and the Wicket Quick start provides we can now create a wicket project.
- The quick start page minimized the risk of errors of mistyping the maven commands.
- The template project structure saved us a lot of typing.
The Less Good:
- The process relies on us having maven installed, so it’s not foolproof
- The process only starts a new project. The more common scenario is to jump in on an existing project.
The Wicket Quick Start example showed us that it can be simple to provide directions on how to start a project. You need only tell a developer that they need to go to the QuickStart page and type in the name of their components. The web page can enforce naming conventions. Or you can select the components from a menu.
To extend this approach for an existing source tree, you could have the archetype include only the files that specify the source repository. You could then execute mvn scm:update to update your source tree.
If you are doing work on a branch, you can incorporate the release labels in the drop down.
One more thing that the Wicket set up gives you is the ability to run your application using the jetty application server.
What you have is the ability to build and test consistently in your development workspace.
To review, the essentials of the repository pattern are:
- A single, somewhat static set of documentation in a well know place that describes the bootstrap process (Install Maven, for example)
- A step to identify what files to retrieve from version management
- A step to update to the latest source version and obtain all the dependencies.
- A Build and configuration process that allows you to run all of the pre-commit tests in your workspace
If the Getting Started web page seems intimidating, simply add the maven command on the Getting Started page, and have the developer edit the command by hand. Not as foolproof as the generation approach, but should a developer mistype a label or the like, the process will fail quickly.
One you have this basic process in place you have enabled your team to create workspace easily. This will allow you to:
- Build more reliably, as it is easier to create workspace from scratch, and thus eliminate drift between developer workspace and the integration workspace.
- Do integration builds consistently because all of your dependencies are defined.
- Perform support tasks, since creating a workspace for a Release Branch is also simple.
Once you have the basics in place, you can work towards automating more steps. It’s possible to