3 Source Code

Checkout the GeoServer Sources

Downloading Source Release

You can download the latest source code release from the GeoServer download page.

Source code releases are made available every two to four weeks if possible; check the download page to find the latest version.

If you just want to check out the code, using the download is appropriate. However if you wish to contribute back patches then you must work off of the svn version, documented below.

Subversion Repository

The GeoServer source code is located in the Codehaus Subversion Repository.

Repository Structure

The GeoServer subversion repository follows a standard layout:

URL Significance
https://svn.codehaus.org/geoserver/ The 'root' of the repository; all source is contained somewhere within this directory
https://svn.codehaus.org/geoserver/trunk/ The main line of development.  New features are mostly developed here.
https://svn.codehaus.org/geoserver/branches/ One branch is created for each minor release of GeoServer (GeoServer's release scheme is major.minor.point; there are branches for 1.5.x, 1.6.x, etc.)  Branches are just directories within the 'branches' directory; bugfixes are mostly developed here.
https://svn.codehaus.org/geoserver/tags/ One tag is created for each actual release of GeoServer (alphas and betas as well).  No development goes on here; tags exist as a reference point so that we can see exactly what went into each release.

Upon checking out a version of the GeoServer sources later than 1.5, you will see three subdirectories:

  • geoserver: the actual Java sources and other files that are 'built into' GeoServer
  • configuration: several subdirectories containing 'pre-cooked' GeoServer configurations useful for testing
  • unsupported: code that is no longer maintained by the GeoServer team

You need to check out both (Configuration and Geoserver). So, on your system you should have this:

[my_geoserver]/
  + configuration/
  + geoserver/

The configuration part of the geoserver source tree contains a lot of binary data, which makes checking it out expensive. If you are using a connection in which bandwidth is at a premium, or you do not need any of the configuration files, then it is recommended that you check out only the sources and not the configuration (that is, append /geoserver to the checkout URL: as in https://svn.codehaus.org/geoserver/trunk/*geoserver*).  A minimal configuration directory containing no data is included in the sources.

When you have checked out the data, it is convenient to point geoserver at the configuration directory. You can do this by creating an environment variable called *configDirectory' and point it to the configuration directory that you just checked out. (Do not point it at any of the sub-directories, just at the configuration one.)

Trunk Source

Trunk sources are available from https://svn.codehaus.org/geoserver/trunk.

Branch Source

Branch sources are available from https://svn.codehaus.org/geoserver/branches/\{name}.   Branch names for release series include the major and minor version numbers for the series, followed by an 'x' to indicate they do not correspond to a particular released package from that series.  For example, the 1.7 series corresponds to the SVN URL https://svn.codehaus.org/geoserver/branches/1.7.x/.

Checking Out

Checking out the source code is dependent on the subversion client you decide to use. Subversion installation instructions are located here.

Important

You must use the attached subversion configuration file. It ensures that newlines are handled correctly by subversion across platforms. Without it you will suffer conflicts when you commit.

Windows users should copy this file to C:\Documents and Settings\ %USERID% \Application Data\Subversion\config. You will need to have view system folders turned on to see "Application Data" in explorer. You'll also need to create the subversion folder.

Linux / Unix users should copy this file to ~/.subversion/config

For more information about subversion, read subversion book. It is an important read if you are new to subversion. There are also some tips and tricks located here.

Command Line Client

Command line access is similar to CVS. Once again your best reference is the subversion book. To checkout the development version use the following command:

svn co https://svn.codehaus.org/geoserver/trunk/

If you just want the sources and no configuration files use:

svn co https://svn.codehaus.org/geoserver/trunk/geoserver

If you instead need the stable version (for 1.6 versions) checkout with the following command:

svn co http://svn.codehaus.org/geoserver/branches/1.6.x/

If you just want the stable sources and no configuration files use:

svn co http://svn.codehaus.org/geoserver/branches/1.6.x/geoserver

Tortoise SVN

  • Create a folder for GeoServer to live in
    C:\java\geoserver
    
  • Navigate to the folder, and right-click
  • Select SVN Checkout ...
  • Press OK

Tortoise SVN includes a command client as a windows shell extension.

Netbeans

A Netbeans profile is available here.

To ignore the ubiquitous .svn folders:

  • Click the filesystem node
  • Set the Ignored Files property to include '.svn'

Eclipse / Subclipse

Eclipse plug-in support is provided by Subclipse a detailed guide is available in [Eclipse Developers Guide].

If you are using Subclipse, you need the latest version because earlier versions would give Server certificate verification failed: issuer is not trusted error. The new version will prompt you when this happens and you should perminently accept the certificate. Subclipse will ask you for a username/password when you do your first write.

Added by Chris Holmes, last edited by David Winslow on Aug 18, 2008  (view change)

Comments

miles says:

If you are behind a proxy, you need to create a 'servers' file in the same place as the 'config' file mentioned above.

In it, you should have something like:

[groups]
geoserver = svn.codehaus.org, svn.openlayers.org

[geoserver]
http-proxy-host = your.proxy.host
http-proxy-port = 8080
http-proxy-username = your_username
http_proxy-password = your_password

Obviously you should change the host, port number, and use your username and password. Remove the username and password lines completely if you dont need to use one with your proxy server.

View Attachments (2) Info