Prerequisites
To build GeoWebCache you need
- Sun Java Developer Kit Standard Edition, version 5 or 6
- Maven 2.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. Maven will automatically download anything tools you need, including the libraries for JCS: 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, after upi jave configure
- Go into the directory wher 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 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
