Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This will give you a directory structure like the following directory tree:

  • wicket-parent/
  • wicket/
  • wicket-extensions/
  • wicket-examples/
  • wicket-spring/
  • wicket-spring-annot/
  • 1.x
  • wicket-1.x/jdk-1.4
  • wicket-1.x/jdk-1.4/wicket
  • wicket-1.x/jdk-1.4/wicket-extensions
  • wicket-1.x/jdk-1.4/wicket-spring
  • ...
  • wicket-1.x/jdk-1.5
  • wicket-1.x/jdk-1.5/wicket-auth-roles
  • wicket-1.x/jdk-1.5/wicket-examples
  • wicket-1.x/jdk-1.5/wicket-spring-annot
  • ...wicket-auth-roles/

In this document we focus at the Wicket parent project, maven project descriptor located in the top level directory,
which enforces default settings for
all Wicket projects such as plug-in settings, versioning
of the Wicket projects, managing the
various dependencies and more.

...

The build has two parts: a Java 1.4 part for the projects that are Java 1.4 based and
a Java 5 part, specific for the projects that are Java 5 based.

Here's a list of the Java 1.4 based projects:

  • wicket
  • wicket-extensions
  • wicket-examples
  • wicket-quickstart
  • wicket-spring
  • wicket-spring-examples
  • wicket-portlet-examples

Here's a list of the Java 5 based projects:

  • wicket-jmx
  • wicket-auth-roles
  • wicket-auth-roles-examples
  • wicket-spring-annot
  • wicket-spring-annot-examples

To build the projects, make sure you have downloaded and installed all projects in one
directory structure, each project a subdirectory next to one another. If you want to get it
all in one sweep, then use subversion to checkout the whole project structure in one go.

svn co https://svn.apache.org/repos/asf/incubator/wicket/releases/Image Removed<VERSION>

substituting the <VERSION> part with "wicket-X.Y.Z", where X, Y and Z are the major, minor and
bugfix version. So for Wicket-1.2.4 you would check out:The corresponding projects
reside (you guessed it!) in the jdk-1.4 and jdk-1.5 sub directories.

svn co https://svn.apache.org/repos/asf/incubator/wicket/releasesbranches/wicket-1.2.4xImage Modified

The development version of wicket 1.x can be found in branch wicketIf you want to ensure that your Wicket version is built using JDK-1.x, and
the latest and greatest development version (currently Wicket 2.x) can be found in trunk.
The branches 1.0.x, 1.1.x and 1.2.x are for versions that are no longer actively
developed, but which may in exception cases receive bug fixes.

Stage one:
mvn -Pjdk1.4 install

Stage two (if you're running JDK 5):
mvn -Pjdk1.5 install

4 and fully compatible with that Java version,
you will need to build is with a Java 1.4 compiler and runtime library. Maven is set up so that it will only build
the JDK-1.4 projects when it is started using a 1.4 Java version.

Building all of Wicket is as simple as issuing the following command in the root directory:

Code Block

mvn install

This will compile, test, package and install all Wicket projects. Installation means putting the jar files into your
local Maven repository, including the source and javadoc jarsYou may need to run with -Dmaven.test.skip=true if you have failing unit tests (this obviously
shouldn't be the case for a release build).

The following commands are useful:

...

You can just run the install target, as Maven will build the previous stages automatically.

Building Wicket 2.x

Wicket 2.x development is done in the trunk of our subversion repository. Wicket 2.x will
also only run on JDK 1.5 or newer. Therefore building Wicket 2.x is easier than building Wicket 1.x.

Getting the latest and greatest for Wicket 2.x development is as easy as:

svn co https://svn.apache.org/repos/asf/incubator/wicket/trunkImage Removed

then change the directory to the wicket-parent subdirectory and run:

mvn install

Coping with test failures

As this is our main development you might/will encounter failing unit tests. These can be skipped using:

Code Block

mvn -Dmaven.test.skip=true install

Of course, all limits are off then and your mileage may vary if you use such a built jar.

...

Code Block
xml
xml
<dependency>
    <groupId>org.apache.wicket</groupId>
    <artifactId>wicket</artifactId>
    <version>1.3.0-incubating-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

And adding this to your Eclipse, NetBeans or NetBeans IntelliJ IDEA project classpath is then as simple as:

  • mvn eclipse:eclipse or
  • mvn netbeans:netbeans or
  • mvn idea:idea

Maven will then add all the necessary JAR files to the project's classpath.

One thing you need to make sure is that you have set the M2_REPO classpath variable in
Eclipse (or a similar construct in Netbeans), and point it to your local repository, typically found in
C:\Documents and Settings\username\.m2\repo or (for unix buffs) ~/.m2/repo

You can add this setting using maven:

Code Block

mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo