{"id":15673340,"url":"https://github.com/arey/embedded-jetty-webapp","last_synced_at":"2025-05-06T22:07:47.120Z","repository":{"id":29826681,"uuid":"33371242","full_name":"arey/embedded-jetty-webapp","owner":"arey","description":"WAR-less Java web application with Jetty","archived":false,"fork":false,"pushed_at":"2023-12-08T07:57:44.000Z","size":20,"stargazers_count":17,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T22:07:45.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/arey.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":"2015-04-03T16:13:17.000Z","updated_at":"2024-05-21T07:48:58.000Z","dependencies_parsed_at":"2024-10-23T11:25:10.193Z","dependency_job_id":null,"html_url":"https://github.com/arey/embedded-jetty-webapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arey%2Fembedded-jetty-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arey%2Fembedded-jetty-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arey%2Fembedded-jetty-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arey%2Fembedded-jetty-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arey","download_url":"https://codeload.github.com/arey/embedded-jetty-webapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776581,"owners_count":21802468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-03T15:39:56.154Z","updated_at":"2025-05-06T22:07:47.074Z","avatar_url":"https://github.com/arey.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Embedded Jetty web application #\n\nThis project shows how to build a WAR-less Java web application with Jetty.\n\nOnly a single JVM is required to start the web app. No web container or JEE server is required.\n\nInstead of building a war file, an auto-executable JAR file is built with Maven (ie. jetty-webapp-1.0.0-SNAPSHOT.jar)\n\nThis JAR contains all resources required by a web application: web.xml, index.jsp, images, js, css...\nThe JettyServer class provides both a start and a stop method. Its main method starts the server. To stop it, you may use the Stop class.\n\nThanks to the [Application Assembler Maven Plugin](http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/) a start.sh and a stop.sh script are available.\n\nAll JAR dependencies are available in a lib\\ sub-directory.\n\n\n## Try it ##\n\nDownload the code with git:\n```git clone git://github.com/arey/embedded-jetty-webapp.git```\n\nBuild and package the web application\n\n```\ncd embedded-jetty-webapp\nmvn clean install\n```\n\nStart the web application\n\n```\ntarget/appassembler/bin/start.sh \u0026\n```\n\nStop the web application\n\n```\ntarget/appassembler/bin/stop.sh\n```\n\nBrowse to [http://localhost:8080/HelloWorld](http://localhost:8080/HelloWorld)\n\nWeb port could be changed at startup:\n\n```\ntarget/appassembler/bin/start.sh 80 8090 \u0026\n```\n\nAnother possibility is to build a JAR that include all its dependencies (web app, jetty dependencies, logger, spring ...) :\n```\nmvn clean install -Pfatjar\njava -jar target/jetty-webapp-1.0.0-SNAPSHOT-jar-with-dependencies.jar\njava -cp target/jetty-webapp-1.0.0-SNAPSHOT-jar-with-dependencies.jar com.javaetmoi.jetty.Stop\n```\n\n## Configuration rules ##\n\nCompared to the [Maven Standard Directory Layout](https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html)\nof a WAR, the web application sources is not put into the ```src/main/webapp``` but into the ```src/main/resources/webapp```.\nThus the webapp resources are copied into the JAR in a webapp/ sub-directory.\n\n## Credits ##\n\n* Uses [Maven](http://maven.apache.org/) as a build tool\n* Uses [Maven Jetty plugin](https://github.com/eclipse/jetty.project) source code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farey%2Fembedded-jetty-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farey%2Fembedded-jetty-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farey%2Fembedded-jetty-webapp/lists"}