Dataverse is an open source web application for sharing, citing, analyzing, and preserving research data developed by the ICM development team at the University of Warsaw.
It is a detached fork from IQSS Dataverse developed by the Data Science and Products team at the Institute for Quantitative Social Science and the Dataverse community).
Build dataverse with running all the tests (unit and integration tests):
$ ./mvnw clean install
Build dataverse without running tests:
$ ./mvnw clean install -DskipTests -Ddocker.skip
The recommended development environment is based on docker. The first time the dev environment needs to be installed with:
$ ./dev install
This will create all the required docker images and containers and run the dataverse installer. Installed services and their ports:
- smtp, UI: 8025 smtp: 1025
- postgres: 5432
- solr: 8983
- keycloak: 7070 (admin dns: local.admin.keycloak non-admin: local.keycloak)
- glassfish:
- 8080: Dataverse
- 4848: Admin console
- 9009: Debug
Once installed the environment can be started and used as follows:
$ ./dev start
$ # restart the whole environment
$ ./dev restart
$ # restart glassfish service
$ ./dev restart glassfish
$ # show service logs
$ ./dev logs glassfish
$ # show solr logs
$ ./dev logs solr
$ # stop the environment
$ ./dev stop
$ # show environment help
$ ./dev help
To operate with the glassfish application server:
$ # start the glassfish server
$ ./dev glassfish start
$ # list all the deployed applications
$ ./dev glassfish apps
$ # re-deploy dataverse (uses the war located in dataverse-dist/target/dist)
$ ./dev glassfish redeploy
$ # show glassfish commands
$ ./dev glassfish help
Glassfish is started in debug mode by default. You can connect to it with the IDE with: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009
All tests:
./mvnw verify
Single test:
./mvnw verify -Dit.test=UserNotificationRepositoryIT -pl dataverse-persistence
Integration test dependencies can be started manually in order to execute integration tests through the IDE:
./mvnw docker:start -pl dataverse-webapp
Once started, all the integration tests can be run through the IDE. When finished, containers can be stopped with:
./mvnw docker:stop -pl dataverse-webapp
CI builds can be configured with the provided Jenkinsfile. It defines the following 6 stages:
- Prepare: Just creates the image used for the build. It is based on openjdk:8u342-jdk and has been adapted to run on jenkins (jenkins user has been added)
- Build: Performs clean build of the checked out branch
- Unit tests: Executes the unit tests and collects the results
- Integration tests: Executes the integration tests and collects the results. Required docker containers (solr & postgres) are started and it's made sure that they're in the same network as the container running the tests
- Deploy: Publishes the snapshot artifacts to artifactory. This usually should only be performed on develop, but there's an option to override the check and let it execute also on other branches.
- Release: Perform the release of the current development version. The next development version will be set according to the nextDevVersion parameter (default is patch). If current version is 1.0.3-SNAPSHOT the next dev version will be:
- patch: 1.0.4-SNAPSHOT
- minor: 1.1.0-SNAPSHOT
- major: 2.0.0-SNAPSHOT
All stages are parameterized and can be skipped as desired for a given jenkins job.