Create a custom Oskari-server extension

This document describes how to use maven artifacts provided in Oskari Maven repository to build customized Oskari-server.


1. Template maven project

Download a template for the webapp

2. Start modifying the content

  • Edit the pom.xmls to change the groupId/artifactId and oskari.version.
  • Edit the pom.xmls to add/change the included dependencies
  • Edit the app-resources to configure app-myapp.json/myapp-view.json/mylayer.json. These are used by default since webapp-map overrides app-default.json.
  • Edit the myapp.jsp under webapp-map to modify the base HTML.
  • Create your own action routes like MyAction under server-extension.

The released Oskari artifacts are downloaded from Maven repository:

        <name> release repository</name>
        <name> snapshot repository</name>

3. Build

This will build your webapp and include your code on top of the Oskari-server.

cd oskari-server-extension
mvn clean install

4.Deploy to servers

Copy the war packages from under oskari-server-extension/webapp-map/target/ and oskari-server-extension/webapp-transport/target/ to your servers deploy folder {JETTY_HOME}/webapps

Note! You will need to adjust accordingly. For example if you only add one view, the id of that view should be the default view in OR you can remove the default view configuration so it will use the view type "DEFAULT" on database to detect the default view.


Last modified: Tue Dec 18 2018 14:34:29 GMT+0200 (EET)