{"id":37908919,"url":"https://github.com/arthurgregorio/library","last_synced_at":"2026-01-16T17:17:30.677Z","repository":{"id":27627424,"uuid":"114695632","full_name":"arthurgregorio/library","owner":"arthurgregorio","description":"Simple app to show how to work with Jee standard frameworks","archived":false,"fork":false,"pushed_at":"2025-07-14T05:13:49.000Z","size":1402,"stargazers_count":28,"open_issues_count":36,"forks_count":18,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-07-14T07:35:32.485Z","etag":null,"topics":["apache","bean-validation","cdi","hibernate","jpa","jsf","primefaces","sample","shiro","wildfly"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthurgregorio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-18T22:53:06.000Z","updated_at":"2024-03-31T14:20:21.000Z","dependencies_parsed_at":"2024-08-02T11:42:08.400Z","dependency_job_id":"d3ac435d-cc76-45e6-b19f-913c60b9f318","html_url":"https://github.com/arthurgregorio/library","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/arthurgregorio/library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurgregorio%2Flibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurgregorio%2Flibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurgregorio%2Flibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurgregorio%2Flibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthurgregorio","download_url":"https://codeload.github.com/arthurgregorio/library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurgregorio%2Flibrary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","bean-validation","cdi","hibernate","jpa","jsf","primefaces","sample","shiro","wildfly"],"created_at":"2026-01-16T17:17:30.614Z","updated_at":"2026-01-16T17:17:30.671Z","avatar_url":"https://github.com/arthurgregorio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library\n\nA simple demo application to show how to work with the default technologies of JavaEE version 8 (or higher). This conceptual \narchitecture makes use of the following technologies:\n\n- Java 13+\n- JavaEE 8 with Thorntail 2.6\n- PostgreSQL 11+\n- Hibernate 5 and JPA 2.2\n- Weld 3.0 for CDI 2.0\n- Mojarra for JSF 2.3 + Primefaces 7 + [AdminLTE](https://adminlte.io/) 2.4 + Bootstrap 3\n- Apache Delta Spike JPA + QueryDSL\n- Apache Shiro 1.4 provided by [ShiroEE](https://github.com/arthurgregorio/shiro-ee) extension\n- LDAP and Active Diretory integration for user authentication \n- Maven for dependency management and build  \n- Flyway 6 for database migrations\n- Database audit with Hibernate Envers 5\n- Hibernate Validator 6 for Bean Validation\n- Omnifaces 3 and Primefaces Extensions for JSF utilities \n- Lombok, Google Guava and Apache Commons-lang for class level utilities\n- Mustache for e-mail templating \n- Webservices with JAX-RS (RestEasy) \n\nIt's not much say that if you want a **production ready architecture**, this is the project you are looking for.\n\n### Create the database\n\nBefore the configuration step, create the database to used by the application:\n\n```sql\n-- the user\nCREATE USER sa_library WITH\n  LOGIN\n  NOSUPERUSER\n  INHERIT\n  NOCREATEDB\n  NOCREATEROLE\n  NOREPLICATION\n  ENCRYPTED PASSWORD 'sa_library';\n \n -- the database\n CREATE DATABASE library\n    WITH \n    OWNER = sa_library\n    ENCODING = 'UTF8'\n    LC_COLLATE = 'en_US.utf8'\n    LC_CTYPE = 'en_US.utf8'\n    TABLESPACE = pg_default\n    CONNECTION LIMIT = -1;\n```\n\nThe tables and the initial data (default user, group and authorizations) should be created by Flyway with the migrations \nstrategy. If you want to run this application in development mode, Hibernate will create the tables, but you must create \nthe schemes manually on PgAdmin or other similar software:\n\n```sql\nCREATE SCHEMA configuration AUTHORIZATION sa_library;\nCREATE SCHEMA registration AUTHORIZATION sa_library;\n```\n\n### Configure the application\n\nThe application provides three profiles to build and configure the application:\n\n- *ALPHA* -for development environments\n- *BETA* - for testing environments\n- *RELEASE_CANDIDATE* - for validation and final testing (approval of changes)\n- *RELEASE* - used in production environments\n\nEvery profile has his own configurations, it means that you can have separated environments and to activate them you\njust need to build the application again.\n\nBelow we will configure the RELEASE profile and build a production artifact:\n\n```xml\n\u003cprofile\u003e\n    \u003cid\u003erelease\u003c/id\u003e\n    \u003cproperties\u003e\n        \u003capplication.version\u003e${project.version}-RELEASE\u003c/application.version\u003e\n        \u003capplication.base-url\u003ehttps://localhost:8443/\u003c/application.base-url\u003e\n        \u003cskip.tests\u003efalse\u003c/skip.tests\u003e\n        \u003cproject.stage\u003eProduction\u003c/project.stage\u003e\n        \u003cmail.host\u003emy-mail-host\u003c/mail.host\u003e \n        \u003cmail.port\u003e587\u003c/mail.port\u003e\n        \u003cmail.debug\u003efalse\u003c/mail.debug\u003e\n        \u003cmail.from-address\u003enoreply@your-domain.com\u003c/mail.from-address\u003e\n        \u003cmail.username\u003emy@account.com\u003c/mail.username\u003e\n        \u003cmail.password\u003esecret\u003c/mail.password\u003e\n        \u003cdatabase.host\u003elocalhost\u003c/database.host\u003e\n        \u003cdatabase.port\u003e5432\u003c/database.port\u003e\n        \u003cdatabase.name\u003elibrary\u003c/database.name\u003e\n        \u003cdatabase.username\u003esa_library\u003c/database.username\u003e\n        \u003cdatabase.password\u003esa_library\u003c/database.password\u003e\n        \u003corm.show_sql\u003efalse\u003c/orm.show_sql\u003e\n        \u003corm.ddl_auto\u003enone\u003c/orm.ddl_auto\u003e\n        \u003cws.base-url\u003ehttps://my-webservice-server.com\u003c/ws.base-url\u003e\n        \u003cws.username\u003eadmin\u003c/ws.username\u003e\n        \u003cws.password\u003eadmin\u003c/ws.password\u003e\n        \u003cws.client-name\u003eadmin\u003c/ws.client-name\u003e\n        \u003cldap.enabled\u003efalse\u003c/ldap.enabled\u003e\n        \u003cldap.url\u003eldap://localhost\u003c/ldap.url\u003e\n        \u003cldap.baseDn\u003eOU=Users,DC=arthurgregorio,DC=eti,DC=br\u003c/ldap.baseDn\u003e\n        \u003cldap.user\u003eCN=bind-user,OU=Applications,DC=arthurgregorio,DC=eti,DC=br\u003c/ldap.user\u003e\n        \u003cldap.password\u003emy-bind-password\u003c/ldap.password\u003e\n    \u003c/properties\u003e\n\u003c/profile\u003e\n```\n\nAs you can see, just fill the properties with your configurations and build with the command below:\n\n```shell script\nmvnw clean package -Prelease\n```\n\n\u003e **Quick tip**!\n\u003e\n\u003e Windows users should use ```mvnw.bat```, Linux users ```./mvnw```\n\nAfter the build process, a folder called ```target``` should appear and inside you will find the artifacts \n```library-x.x.x-RELEASE-thorntail.jar``` and ```library-x.x.x-RELEASE.war```, it means that you are ready to run the \napplication.\n\nTo do that, just use:\n\n```shell script\njava -jar target/library-x.x.x-RELEASE-thorntail.jar \n```\n\nIf you have Java JDK installed, the application will start and should be available on ```http://localhost:8080/```, the \nusername and password to access are ```admin```.\n\n\u003e **Quick tip!**\n\u003e \n\u003e You can run the application directly from the build process using Thorntail Maven Plugin, just use\n\u003e ```mvn clean package -Prelease thorntail:run``` \n\n### Running inside the IDE\n\nWe use maven to build the application and almost all the IDE on the market have a feature to import maven projects.\n\nBy that, just import the project and you are ready to go!\n\n### Contact\n\nIf you have any problem or want to contact me, send me an e-mail at: contato@arthurgregorio.eti.br\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurgregorio%2Flibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurgregorio%2Flibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurgregorio%2Flibrary/lists"}