The License Dictionary application is a RESTful web applications that is meant to store metadata about licenses (e.g. fedora and spdx names, abbreviations, urls) and the relation between software dependencies and their licenses.
The application is secured with Keycloak and stores the data in the database.
The DB used (h2 or postgresql) depends on the chosen project stage (see src/main/resources/project-stages.yml
).
For local development, you can use development
stage:
- start the Keycloak server (which listens at http://localhost:8180/auth/):
./devtools/startDevKeycloak.sh
- start the application (which listens at http://localhost:8181/) using an in-memory h2 database:
mvn clean package && java -jar target/license-dictionary-1.0-SNAPSHOT-swarm.jar -S development
To use a PostgreSQL db, you can use docker-postgres
stage:
- start the Keycloak server (which listens at http://localhost:8180/auth/):
./devtools/startDevKeycloak.sh
- start a PostgreSQL db in a Linux container:
./devtools/startDevPostgres.sh
- start the application (which listens at http://localhost:8181/):
mvn clean package && java -jar target/license-dictionary-1.0-SNAPSHOT-swarm.jar -S docker-postgres
To work with UI you can use ng-cli
To work efficiently, start the server (by running the *-swarm.jar
), then go to impl/src/main/ui
and run the following script:
./startUi.sh
The development Keycloak server listens at http://localhost:8180/auth/
and has at least one user defined; username is admin
, password id 123
. You can log with this credentials to add or update a license.
The PostgreSQL embedded in the Linux container listens at http://172.171.17.117:5432
. The username is license-dictionary
, password is 123
.
Swagger has been enabled to document the REST APIs, using the Swarm built-in fractions (org.wildfly.swarm:swagger
and org.wildfly.swarm:swagger-webapp
). Configuration is done via the file src/main/resources/META-INF/swarm.swagger.conf
. You can see and test the REST APIs visiting http://localhost:8181/swagger-ui?url=/rest/swagger.json
(the swagger.json
is autogenerated visiting http://localhost:8181/rest/swagger.json
).