{"id":21806501,"url":"https://github.com/thibseisel/tomee-webapp-archetype","last_synced_at":"2026-04-29T20:33:27.264Z","repository":{"id":129022864,"uuid":"87948589","full_name":"thibseisel/tomee-webapp-archetype","owner":"thibseisel","description":"Maven archetype that allows quick creation and deployment of a webapp with a TomEE server and a MySQL database.","archived":false,"fork":false,"pushed_at":"2017-09-05T11:03:46.000Z","size":2308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T15:41:50.326Z","etag":null,"topics":["angular4","docker","javaee","maven-archetype","tomee"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thibseisel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-04-11T15:11:36.000Z","updated_at":"2017-08-23T08:48:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd79efe0-04bb-4891-b68d-6f8f4ff917c6","html_url":"https://github.com/thibseisel/tomee-webapp-archetype","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thibseisel/tomee-webapp-archetype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibseisel%2Ftomee-webapp-archetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibseisel%2Ftomee-webapp-archetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibseisel%2Ftomee-webapp-archetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibseisel%2Ftomee-webapp-archetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thibseisel","download_url":"https://codeload.github.com/thibseisel/tomee-webapp-archetype/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibseisel%2Ftomee-webapp-archetype/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["angular4","docker","javaee","maven-archetype","tomee"],"created_at":"2024-11-27T12:20:08.767Z","updated_at":"2026-04-29T20:33:27.239Z","avatar_url":"https://github.com/thibseisel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tomee-webapp-archetype\r\nMaven archetype that allows quick creation and deployment of a webapp with a TomEE server and a MySQL database.\r\nIn addition to the server-side sample code, this archetype also setups the development environment of an Angular 4.0 front-end project.\r\n\r\n# Prerequisites\r\n\r\n- Maven\r\n- Docker\r\n- NodeJS v6.9.0 or newer\r\n\r\nNote that if you're using Windows, you need to install a virtualization tool such as VirtualBox to run Docker in a Linux virtual machine. \r\n\r\n# Using this archetype\r\n\r\nClone this repository and copy this Maven archetype to your local repository, located under __homedir/.m2/repository__.\r\n\r\n  ```\t\r\n  cd tomee-webapp-archetype  \r\n  mvn install\r\n  ```\r\n\r\nYou can now generate a new project using this archetype.\r\n\r\n```\r\nmvn archetype:generate -DarchetypeGroupId=fr.nihilus -DarchetypeArtifactId=tomee-webapp-archetype\r\n```\r\n\r\nYou will be prompted to specify your groupId, artifactId, version and package name.\r\nBefore accepting the setup by typing Y, check that the value of the following properties are correct :\r\n- __dbName__ : the name you want to give to your MySQL database\r\n- __dbUser__ : the name of your MySQL user. This will be used by your application to connect via JPA.\r\n- __dbPassword__ : the password for your user.\r\n- __dbRootPassword__ : the password for the _root_ user.\r\n\r\nIf not, type N and set their value to match your expectations.\r\n\r\nYour project is now fully generated !\r\n\r\n# Running the generated project\r\n\r\n## Windows\r\n\r\nCopy the content of the folder _docker/DEV_ of your generated project to your Linux virtual machine.\r\nIn order to do that, you can use WinSCP or type the following command in a Git Bash :\r\n```bash\r\nscp -r docker/DEV/* username@localhost:~\r\n```\r\nWhere _username_ is the name of your user in virtual machine.\r\n\r\nWhen done, create the MySQL and TomEE docker images with the provided scripts.\r\n\r\n```bash\r\n./build-images.sh  \r\n./run-images.sh  \r\n```\r\n\r\nCheck that TomEE is working correctly by opening your browser with the following url address : _http://localhost:8080_.\r\nYou can now build the Angular part of this sample project and then upload the whole project to the running TomEE container.\r\nNavigate to the root folder of the project and run those commands :\r\n```\r\ncd angular  \r\nnpm install  \r\nnpm run build  \r\ncd ..  \r\nmvn tomcat7:deploy\r\n```\r\n\r\nFinally, open a browser at _http://localhost:8080/myapp_, where _myapp_ is the artifactId you gave when generating your project.\r\nIf a success message appear, then your project and development environment are now all set !\r\n\r\n## Linux\r\n\r\nYou don't have to install a virtual machine to run Docker.\r\nNavigate to the docker/DEV directory of your generated project., and run the following scripts to create your MySQL and TomEE docker images :\r\n\r\n```\r\n./build-images.sh  \r\n./run-images.sh  \r\n```\r\n\r\nCheck that TomEE is working correctly by navigating to the following url address : _http://localhost:8080_.\r\nYou can now build the Angular part of this sample project and then upload the whole project to the running TomEE container.\r\nNavigate to the root folder of the project and run those commands :\r\n```\r\ncd angular  \r\nnpm run build  \r\ncd ..  \r\nmvn tomcat7:deploy\r\n```\r\n\r\nFinally, open a browser at _http://localhost:8080/myapp_, where _myapp_ is the artifactId you gave when generating your project.\r\nIf a success message appear, then your project and development environment are now all set !\r\n\r\n# Generated directory structure\r\nThe generated project follows the Maven standard directory structure.\r\n\r\n```\r\n.\r\n+-- _angular\r\n+-- _docker\r\n+--\t_src\r\n\t+-- _main\r\n\t\t+-- _java\r\n\t\t+-- _resources\r\n\t\t+-- _webapp\r\n\t+-- _test\r\n\t\t+-- java\t\r\n```\r\n\r\n- The __src/main/java__ folder contains the code for your Java server application\r\n- The __src/main/resources__ folder mainly contains configuration files (in our case, _persistence.xml_)\r\n- The __src/main/webapp__ folder is where you put your HTML and Javascript client code\r\n- The __src/test/java__ folder replicates the src/main/java package structure and contains all unit tests\r\n- The __angular__ folder contains an Angular project generated with [@angular/cli](https://cli.angular.io)\r\n\r\nIn this project, there's an additional __docker__ folder containing script you used to setup your development environment.\r\n\r\n# Sample code\r\nThe generated project features an example of a working RESTful application allowing to store and retrieve books.\r\nNote that it only accepts JSON.\r\nYou can issue the following requests :\r\n- __GET /api/books__ to get the list of all books from the database,\r\n- __GET /api/books/{id}__ to get a specific book by its id,\r\n- __POST /api/books__ to add a new book to the database (body must feature and object with a property \"title\"),\r\n- __PUT /api/books/{id}__ to update an existing book (body must feature and object with a property \"title\"),\r\n- __DELETE /api/books/{id}__ to delete an existing book.\r\n\r\nYou are free to modify or delete this code to replace it with your own application logic.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibseisel%2Ftomee-webapp-archetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthibseisel%2Ftomee-webapp-archetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibseisel%2Ftomee-webapp-archetype/lists"}