This document describes how to setup development environment for Oskari using source code. If you want to develop / maintain oskari yourself this is the correct section. For setting up an instance using the ready jetty bundle check out Setup Jetty
The following items are assumed installed.
- JDK 8
- Maven 3+ (developed using 3.5.0)
- Git client (http://git-scm.com/) - Optionally download zip file from https://github.com/oskariorg/oskari-server
{jetty.base}
refers to the oskari-server folder in an unzipped Jetty bundle
Configure line endings: https://help.github.com/articles/dealing-with-line-endings/
Ignore file permissions:
git config --global core.fileMode false
With commandline git:
git clone https://github.com/oskariorg/oskari-server.git
Note! You can also download the codes in zip format from Github, but for contributing any changes to Oskari git is mandatory. Additional Maven modules can be contributed outside git though if they are compatible with the current develop/master branch, but this is not adviced.
Note! The frontend source code is already available under {jetty.base}/oskari-frontend
in the Jetty bundle. To update it you can replace it with code found in https://github.com/oskariorg/oskari-frontend.
This will build all modules that Oskari server is composed of.
cd oskari-server
mvn clean install
To test your changes on a running web app you can use sample-server-extension to create a webapp using your modified version of oskari-server. Check that the oskari.version in pom.xml matches the project version of oskari-server you built.
git clone https://github.com/oskariorg/sample-server-extension.git
cd sample-server-extension
mvn clean install
Map functionality: sample-server-extension/webapp-map/target/oskari-map.war