Skip to content

Latest commit

 

History

History
70 lines (41 loc) · 2.45 KB

README.md

File metadata and controls

70 lines (41 loc) · 2.45 KB

License Dictionary

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.

Developer's guide

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).

H2 stage

For local development, you can use development stage:

./devtools/startDevKeycloak.sh
mvn clean package && java -jar target/license-dictionary-1.0-SNAPSHOT-swarm.jar -S development

PostgreSQL stage

To use a PostgreSQL db, you can use docker-postgres stage:

./devtools/startDevKeycloak.sh
  • start a PostgreSQL db in a Linux container:
./devtools/startDevPostgres.sh
mvn clean package && java -jar target/license-dictionary-1.0-SNAPSHOT-swarm.jar -S docker-postgres

UI development

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

Keycloak

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.

PostgreSQL

The PostgreSQL embedded in the Linux container listens at http://172.171.17.117:5432. The username is license-dictionary, password is 123.

Swagger

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).