This repository is a sub-repository of the Kenzan Million Song Library (MSL) project, a microservices-based Web application built using AngularJS, a Cassandra NoSQL database, and Netflix OSS tools.
NOTE: For an overview of the Million Song Library microservices architecture, as well as step-by-step instructions for running the MSL demonstration, see the Million Song Library Project Documentation.
You can run build all of the MSL microservices by running mvn clean compile
from the server
directory of the main million-song-library repository. Or use the commands below to build, run, and test a single microservice.
NOTE: If you receive an error when running any of the commands below, try using
sudo
(Mac and Linux) or run PowerShell as an administrator (Windows).
Use the following command to generate server source code from the Swagger definition, run tests, and install dependencies:
mvn -P build clean generate-sources install
Use the following command to run the server on port 9003
:
mvn -P dev clean jetty:run
To verify that the server is running, first start Cassandra, and then access the following URL:
http://localhost:9003/catalog-edge/browse/album
If you make changes to the application code, use the following command to format the code according to project styles and standards:
mvn clean formatter:format
Use the following command to install dependencies without running tests:
mvn -P no-tests clean install
Use the following command to package the application code:
mvn -P no-tests package
There are some archaius properties that need to be provided when running the jar files, see example:
java -jar msl-catalog-edge.jar
-Darchaius.deployment.environment=dev \
-Darchaius.configurationSource.additionalUrls=file://${PWD}/../msl-catalog-edge-config/edge-config.properties,file://${PWD}/../msl-catalog-data-client-config/data-client-config.properties
You can use either Cobertura or EclEmma to run tests, whichever you prefer.
Use the following command to run all unit tests and generate a report on test coverage (report is located in /target/site/cobertura/index.html
):
mvn cobertura:cobertura
Use the following command to run all unit tests and generate a report on test coverage (report is located in /target/site/jacoco
):
mvn package