pubs-services
Development
This is a Spring Boot project. All of the normal caveats relating to a Spring Boot application apply.
Dependencies
This application utilizes a PostgreSQL database. pubs-db contains everything you need to set up a development database environment. A Docker image is also available at pubs-db.
Environment variables
To run the project you will need to create the file application.yml in the project's root directory and add the following:
PUBS_DB_HOST: hostNameOfDatabase
PUBS_DB_PORT: portNumberForDatabase
PUBS_DB_NAME: dbName
PUBS_SCHEMA_NAME: dbSchema
PUBS_DB_READ_ONLY_USERNAME: dbUserName
PUBS_DB_READ_ONLY_PASSWORD: changeMe
SERVER_PORT: 8080
SERVER_CONTEXT_PATH: /pubs-services
CROSSREF_PROTOCOL: https
CROSSREF_HOST: test.crossref.org
CROSSREF_URL: /servlet/deposit
CROSSREF_PORT: -1
CROSSREF_USERNAME: crossrefUsername
CROSSREF_PASSWORD: changeMe
CROSSREF_DEPOSITOR_EMAIL: [email protected]
CROSSREF_SCHEMA_URL: http://www.crossref.org/schema/deposit/crossref4.4.0.xsd
pubs.emailList: changeMe
pubs.mailHost: changeMe
PUBS_LOCK_TIMEOUT_HOURS: 1
PUBS_WAREHOUSE_ENPOINT: http://pubs.er.usgs.gov
PUBS_AUTHORIZED_GROUPS: group1, group2, spnGroup, admGroup
PUBS_SPN_GROUPS: spnGroup
PUBS_ADMIN_GROUPS: admGroup
DISSEMINATION_SCHEDULE: <cron type syntax use just a single hyphen for not scheduled>
DISSEMINATION_LIST_URL: https://something.gov
DAYS_LAST_DISSEMINATED: 1
INFOPRODUCT_URL: https://something.gov
SWAGGER_DISPLAY_HOST: localhost:8080
SECURITY_RESOURCE_ID: resourceId
SECURITY_KEYSET_URI: keysetURI
ROOT_LOG_LEVEL: INFO
spring.security.user.password: changeMe
logging.gelf.host: "tcp:localhost"
logging.gelf.port: 12201Optionally adding the following will disable security for local development.
spring.profiles.active: default,insecureTesting
This project contains JUnit tests. Maven can be used to run them (in addition to the capabilities of your IDE).
To run the unit tests of the application use:
mvn packageTo additionally start up a Docker database and run the integration tests of the application use:
mvn verify -DTESTING_DATABASE_PORT=5433 -DTESTING_DATABASE_ADDRESS=localhost -DTESTING_DATABASE_NETWORK=pubsServices -DTESTING_CROSSREF_USERNAME=changeMe -DTESTING_CROSSREF_PASSWORD=changeMeIt is also possible to build the project using the Maven Docker image. Commands to follow are in the .travis.yml file.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
