If you want to stay recent but don't want to build yourself, you can use the snapshots generated by our bamboo server, which are available at http://wicketstuff.org/maven/repository/. |
Building Wicket from source |
We use Maven 2 as our build system.
(Based on http://wicket.apache.org/building-from-svn.html.)
Ensure that you're building with JDK1.5. (As I understand it, JDK 1.6 will build correctly but some of the tests fail as the test results verification doesn't allow for changes in Collection orderings.)
pom.xml
in the top level folder. Find the fragment <version>1.4-SNAPSHOT</version>
and replace SNAPSHOT
with the current date. For example: <version>1.4-20070504</version>
.mvn install
in the top level folder. If this fails because of test failures, execute mvn -Dmaven.test.skip=true install
.For further instructions see the section "Using your own built artifacts" on http://wicket.apache.org/building-from-svn.html.
(Based on http://wicket.apache.org/building-from-svn.html.)
If you want to ensure that your Wicket version is built using JDK-1.4 and fully compatible with that Java version, you will need to build it 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. Note that to build the full set of examples and annotations will require a Java 1.5 compiler.
pom.xml
in the top level folder. Find the fragment <version>1.3.4-SNAPSHOT</version>
and replace SNAPSHOT
with the current date. For example: <version>1.3.4-20070504</version>
.mvn install
in the top level folder. If this fails because of test failures, execute mvn -Dmaven.test.skip=true install
.For further instructions see the section "Using your own built artifacts" on http://wicket.apache.org/building-from-svn.html.
mvn install
, this will compile and install all Wicket modulesmvn install
in that module to recompile, you will have the freshly built JAR in the "target" directorymvn -Dmaven.test.skip=true install
Complete instructions can be found at wicket-parent/README.TXT in branch 1.2.x
Here's a list of commands used often for building wicket:
maven site
- runs unittests and creates the documentation site in <tt>build/docs''maven xdoc
- transforms the project.xml
and the documentation in xdocs
into a site. Does not run unittests, or create javadoc: use maven site
for that.maven test
- runs the unit tests from the commandline (if tests fail, see the results in build/test-reports
)maven jar:install-snapshot
- installs a SNAPSHOT version into your local repository for usage in other projects (make your project dependend on wicket-SNAPSHOT.jar
).maven jar:install
- The same as previous command but it creates{{wicket-VERSION.jar}} and copy to local maven repository.maven console
- keeps maven in memory, allowing faster xdoc transformations, handy for editing documentation in xdocs.Occasionally, especially when building the examples from SVN, you will find that several libraries are not available from public sites like Ibiblio or one of its mirrors.
The fact that those libraries are not available for download by maven, comes from either two issues:
Either way, you need a way to get to those files. For both types of dependencies, there is only one solution:
YOU NEED TO DOWNLOAD THEM YOURSELF
After that, find the jar-file in the distribution that you need, rename it to contain the version of the product, and copy it into your local repository. From then on, you can use the dependency in all your projects, including the wicket examples.
For maven 2 you install a downloaded file to your repository with the following:
mvn install:install-file -Dfile=<file.jar> -DgroupId=<groupid> -DartifactId=<artifact> -Dversion=<version> -Dpackaging=jar -DgeneratePom=true
The Java mail api is not freely distributable. You will have a hard time finding a project distributing the javamail.jar file publicly without written consent of uncle Sun.
C:\Documents and Settings\username\.maven\repository
in a directory using a clear name (javamail comes to mind) and put the jars into the jars
subdirectory, mimicking the repository layout.maven.test.skip
property to true. Example: mvn -Dmaven.test.skip=true clean package