Prerequisites

To build GeoWebCache you need

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

  1. Download and unpack the GeoWebCache archive. Alternatively you can use Subversion to check out the latest version: svn co http://geowebcache.org/svn/trunk
  2. Enter the directory, look for the pom.xml file. Maven will automatically download anything tools you need, including the libraries for JCS: mvn install
  3. This should produce the file target/geowebcache.war.
  4. You are now ready to configure and use GeoWebCache.

Running GeoWebCache in Eclipse

You can easily run GeoWebCache in Eclipse using the following steps, after upi jave configure

  1. Go into the directory wher you checked out GeoWebCache, run mvn clean install
  2. Create the Eclipse files by running mvn eclipse:eclipse
  3. Now go into Eclipse, create a new workspace. Then import (File -> Import) General -> Existing project, and choose the GeoWebCache directory.
  4. 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)
  5. Now do Project -> Clean -> Clean All Projects, Ok
  6. Run -> Run... , double click on Java Application, set Name: GeoWebCache , leave project as is, Main class -> Search , pick Start.
  7. Verify that the .properties files in geowebcache/src/main/resources are 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 sumbmitting patches or comitting, please configure Eclipse to adhere to these standards by going to Project -> Properties -> Java Code Style -> Formatter, then import geowebcache/tools/formatter.xml