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

Generate a copy for an Oskari based server webapp from our template

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
  • The app-resources contain configurations what functionalities, users, map layers and other content to initialize for the Oskari-based server.
  • Edit the geoportal.jsp under webapp-map to modify the base HTML.
  • Create your own action routes like MyAction under server-extension.

The Oskari dependencies 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 sample-server-extension
mvn clean install

4.Deploy to servers

Copy the oskari-map.war file from under sample-server-extension/webapp-map/target/ to your servers deploy folder {JETTY_HOME}/webapps replacing the old one.

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: Fri Mar 15 2024 14:11:33 GMT+0200 (Eastern European Standard Time)