Note | ||
---|---|---|
| ||
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/. |
Excerpt | ||
---|---|---|
| ||
Using Maven to build Building Wicket from source |
Panel | ||||
---|---|---|---|---|
| ||||
|
Building Wicket from Source
We use Maven 2 as our build system. Maven manages our dependencies.
How to build
...
Wicket 1.4
(Based on http://wicket.apache.org/building-from-svn.html.)
Before you start
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.)
The build
- Checkout either the trunk or a tagged 1.4 release.
- If you checked out from the trunk and if you want to fix your snapshot, now is the time to add a date to the version in the file
pom.xml
in the top level folder. Find the fragment<version>1.4-SNAPSHOT</version>
and replaceSNAPSHOT
with the current date. For example:<version>1.4-20070504</version>
. - Execute
mvn install
in the top level folder. If this fails because of test failures, executemvn -Dmaven.test.skip=true install
.
Usage
For further instructions see the section "Using your own built artifacts" on http://wicket.apache.org/building-from-svn.html.
How to build Wicket 1.3
(Based on http://incubatorwicket.apache.org/wicket/building-from-svn.html.)
Before you start
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.
The build
- Checkout either trunk the 1.3 branch or a tagged 1.3 release.
- If you checked out from trunk the branch and if you want to fix your snapshot, now is the time to add a date to the version in the file
pom.xml
in the top level folder. Find the fragment<version>1.3.0-incubating4-SNAPSHOT</version>
and replaceSNAPSHOT
with the current date. For example:<version>1.3.0-incubating4-20070504</version>
. - Execute
mvn install
in the top level folder. If this fails because of test failures, executemvn -Dmaven.test.skip=true install
.
Usage
For further instructions see the section "Using your own built artifacts" on http://incubatorwicket.apache.org/wicket/building-from-svn.html.
How to build
...
Wicket 1.2
...
- Checkout Branch 1.2.x or any other branch or tag. (Browse to the Wicket repository to find your branch/tag.)
- Go to the wicket-parent subdirectory and issue
mvn install
, this will compile and install all Wicket modules - Take the time to hack one of the modules (let's say wicket)
- Issue
mvn install
in that module to recompile, you will have the freshly built JAR in the "target" directory - If failing unit tests are bothering you, use the following maven commandline option:
mvn -Dmaven.test.skip=true install
Complete instructions can be found at wicket-parent/README.TXT in branch 1.2.x
How to build with Maven 1 (up to Wicket 1.1)
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 theproject.xml
and the documentation inxdocs
into a site. Does not run unittests, or create javadoc: usemaven site
for that.maven test
- runs the unit tests from the commandline (if tests fail, see the results inbuild/test-reports
)maven jar:install-snapshot
- installs a SNAPSHOT version into your local repository for usage in other projects (make your project dependend onwicket-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.
Misc notes
Missing Libraries
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.
...
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
...
- Sometime you don't want to run tests each time you build Wicket. You could switch off tests by setting
maven.test.skip
property to true. Example:maven mvn -Dmaven.test.skip=true clean jalopy jar:install
- Maven have a lot of plugins that comes to us in standart Maven bundle. To see list of available goals just type
maven -g
- Sometimes you don't want to allow Maven check *-SNAPSHOT dependencies from the remote repository. For example you have wicket-SNAPSHOT dependency builded by yorself and very poor internet channel. In this case -o switch helps you. Example
maven -o war:webapp
package