Skip to content

Getting Started

IDE used is VSCode

Mapstore requires two disitinct set of tools: Apache Maven for Java and NPM for JavaScript

Installing Maven for Windows

1.Maven Download

  1. Download Maven link
  2. Extract the downloaded file to a folder that is accesible

2.Add MAVEN_HOME System Variable

  1. Open System Enviroment Variables(this needs to be opened in admin mode)
  2. Click on the button "Enviroment Variables..."
  3. Add a new user variable called MAVEN_HOME
  4. Edit the "Path" variable under System variables
  5. Enter %MAVEN_HOME%\bin in the new field. CLick OK to save changes to the variable
  6. Open the command prompt and type mvn -version to make sure installtion was succesful

Make sure that JAVA_HOME system variable is configured properly and pointing to the version of java you are using Java files can usually be found at C:\Program Files\Java

Installing Node.js and NPM

  1. Download Node.js from the following link
  2. Follow installer instructions

Quick Setup and run of MapStore

  • Clone the repository to your current working folder git clone https://github.com/geosolutions-it/MapStore2.git in the terminal
  • Run npm cache clean in the terminal
  • Run npm install in the terminal

Note: If you're struggling to run the local backend instance use the online instance of MapStore as the backend.

Swap out local instance of backend for online instance

  1. Open the following file MapStore2/build/DevServer.js
  2. Set the variable MAPSTORE_BACKEND_URL to the url https://dev-mapstore.geosolutionsgroup.com/mapstore

Changing the MAPSTORE_BACKEND_URL in console using >set MAPSTORE_BACKEND_URL=https://dev-mapstore.geosolutionsgroup.com/mapstore did not work on my machine

Start front end

  • Run npm run fe:start in the terminal to start the app. The app does take some time to install, please be patient

Running the back end

Please note the backend works with jdk version 1.8. Any version higher than that and the build fails - Run backend with npm run be:start

Build a .war file

When running ./build.sh the following error appears "Unable to move the cache: Access is denied" The build does not continue after this point

When running the command mvn compile war:war -e* the following error appears: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) * - To try and remedy this error I added the following in the product/pom.xml - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <extensions>false</extensions> <version>2.1.1</version> <configuration> <overlays> <overlay> <groupId>it.geosolutions.mapstore</groupId> <artifactId>mapstore-webapp</artifactId> **<failOnMissingWebXml>false</failOnMissingWebXml>** </overlay> </overlays> </configuration> </plugin> - This not did fix the error. Still investigating a fix