Prerequisites
To build GeoWebCache you need
- Sun Java Developer Kit Standard Edition, version 5 or 6
- Maven 2.0.x (not tested with 2.1.x)
Configure your build environment
Configure Java and Maven, you need to set the environment variables JAVA_HOME and PATH to include you Java Developer Kit and the Maven executable.
Building GeoWebCache
- Download and unpack the GeoWebCache archive. Alternatively you can use Subversion to check out the latest version: svn co http://geowebcache.org/svn/trunk
- Enter the directory, look for the pom.xml file. If you want to build a WAR file, edit pom.xml, search for war and uncomment the plugin section.
- Maven will automatically download any tools you need, including the libraries. Run mvn install
- This should produce the file target/geowebcache.war.
- You are now ready to configure and use GeoWebCache.
Running GeoWebCache in Eclipse
You can easily run GeoWebCache in Eclipse using the following steps, afer you have Java and Maven configured:
- Go into the directory where you checked out GeoWebCache, run mvn clean install
- Create the Eclipse files by running mvn eclipse:eclipse
- Now go into Eclipse, create a new workspace. Then import (File -> Import) General -> Existing project, and choose the GeoWebCache directory.
- Go to Project -> Properties -> Java Build Path -> Add Variable -> Configure Variables -> New: Name: M2_REPO , Path: /home/<username>/.m2/repository (or wherever your Maven repository lives)
- Now do Project -> Clean -> Clean All Projects, Ok
- Run -> Run... , double click on Java Application, set Name: GeoWebCache , leave project as is, Main class -> Search , pick Start.
- Verify that geowebcache.xml in geowebcache/src/main/resources is correctly configured, then hit Run
Code formatting
GeoWebCache borrows its code formatting style from GeoTools. It's essentially the standard Java guidelines with a few twists. If you plan on submitting patches or committing, please configure Eclipse to adhere to these standards by going to Project -> Properties -> Java Code Style -> Formatter, then import geowebcache/tools/formatter.xml