-
Notifications
You must be signed in to change notification settings - Fork 96
Building instructions
Get the source as usual from github.
The git
command line should be something like
git clone git@github.com:geosolutions-it/geostore.git geostore
Geostore is released with a default configuration that use an in-memory DB for quick running, usefull for evaluation and tests. If your git working directory is called geostore, enter in the sub directory src and type the command:
#geostore/src$ mvn clean install
for build geostore with the default profile wich provide support only for H2 DBMS configured to run in-memory. Once you have finished the build process, go into geostore\src\server\web\app and type the command:
#geostore/src/server/web/app$ mvn jetty:run
this command launch geostore in jetty Servlet container, you can see the exposed service at URL:
http://localhost:8181/geostore/rest
Obviously you can also take the created war archive in your local .m2 repository and deploy it on other servlet containers.
In order to be able to run the psql and createdb commands, you must first set in the "PATH" environment variable the path to the /bin folder of Postgres. The follow commands are referred to the Postgres use.
- Create a PostgreSQL DB called "geostore" (PostGis support is not required).
You may need to run these commands as userpostgres
in the windows Console.
C:\currentDir>createdb -U postgres geostore
- Run the sql script
doc/sql/001_setup_db.sql
on geostore db; it will create the users:
-
geostore
with pwgeostore
-
geostore_test
with pwgeostore_test
and schemas `geostore` and `geostore_test`. You may need to run these commands as user `postgres`.
C:\currentDir>psql -U postgres -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/001_setup_db.sql
- Run the sql script
doc/setup/sql/002_create_schema_postgres.sql
on geostore db, geostore schema; it will create the base tables, indices, etc. Thegeostore_test
schema will be automatically recreated during tests.
C:\currentDir>psql -U geostore -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/002_create_schema_postgres.sql
Note that you are logging in postgres as usergeostore
, so you will be asked for user password, that's set as geostore
as stated above.
The follow commands are referred to the Postgres use.
- Create a PostgreSQL DB called "geostore" (PostGis support is not required).
You may need to run these commands as userpostgres
.
createdb geostore
- Run the sql script
doc/sql/001_setup_db.sql
on geostore db; it will create the users:
-
geostore
with pwgeostore
-
geostore_test
with pwgeostore_test
and schemas `geostore` and `geostore_test`. You may need to run these commands as user `postgres`.
psql -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/001_setup_db.sql
- Run the sql script
doc/setup/sql/002_create_schema_postgres.sql
on geostore db, geostore schema; it will create the base tables, indices, etc. Thegeostore_test
schema will be automatically recreated during tests.
psql -U geostore -d geostore -f YOUR_GEOSTORE_DIR/doc/sql/002_create_schema_postgres.sql
Note that you are logging in postgres as usergeostore
, so you will be asked for user password, that's set as geostore
as stated above.
TODO: add instructions about how to use the HSQLDB instead of pg
Enter the src/
directory and launch
mvn clean install -Ppostgres
You may want to use the profile extjs
in order to have services offering output in EXT json format.
mvn clean install -Pextjs,postgres
The maven install command will create a .war file:
-
src/server/web/app/target/geostore.war
: the geostore service
It will also make available the GeoStore client jar as maven artifact
<dependency>
<groupId>it.geosolutions.geostore</groupId>
<artifactId>geostore-rest-client</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
(The current code may have a later version for the client)
You can run the webapp using the embedded Jetty http server.
In order to run GeoStore, enter into the directory src/server/web/app
and run the command
mvn jetty:run
adding the extjs profile -Pextjs
if needed.