{"id":30039874,"url":"https://github.com/twilio/wiztowar","last_synced_at":"2025-08-07T01:54:02.548Z","repository":{"id":11608452,"uuid":"14102712","full_name":"twilio/wiztowar","owner":"twilio","description":"Build WARs from your Dropwizard apps","archived":false,"fork":false,"pushed_at":"2023-04-10T02:17:25.000Z","size":310,"stargazers_count":40,"open_issues_count":5,"forks_count":18,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-04-10T09:49:47.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twilio.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}},"created_at":"2013-11-04T06:44:11.000Z","updated_at":"2024-04-10T09:49:47.651Z","dependencies_parsed_at":"2024-01-03T02:24:46.056Z","dependency_job_id":"3c9cb90f-7679-427f-8f1b-8e45616ecbd2","html_url":"https://github.com/twilio/wiztowar","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/twilio/wiztowar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twilio%2Fwiztowar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twilio%2Fwiztowar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twilio%2Fwiztowar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twilio%2Fwiztowar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twilio","download_url":"https://codeload.github.com/twilio/wiztowar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twilio%2Fwiztowar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269185789,"owners_count":24374634,"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","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-07T01:53:59.827Z","updated_at":"2025-08-07T01:54:02.529Z","avatar_url":"https://github.com/twilio.png","language":"Java","funding_links":[],"categories":["Open Source"],"sub_categories":["Deployment"],"readme":"WizToWar - Have your cake and eat it too\n========================================\n\nWizToWar is a simple library that enables a [Dropwizard](http://dropwizard.io) service to also be deployable in a WAR container such as Tomcat.\n\nBy following the steps in the usage section below you will be able to create\nboth a Dropwizard jar and a WAR of the same service.\n\n\nCaveat emptor:\n--------------\n\n* Only tested on Tomcat 7\n* No support for bundles\n* Many features untested\n* Goes against the whole philosophy of Dropwizard...\n\nUsage\n------\n\nInclude the wiztowar jar as a dependency:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.twilio\u003c/groupId\u003e\n    \u003cartifactId\u003ewiztowar\u003c/artifactId\u003e\n    \u003cversion\u003e1.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nCreate a new class for your application like this:\n\n```java\npackage com.twilio.mixerstate;\n\nimport com.google.common.io.Resources;\nimport com.twilio.wiztowar.DWAdapter;\nimport com.yammer.dropwizard.Service;\n\nimport java.io.File;\nimport java.net.URISyntaxException;\nimport java.net.URL;\n\n\npublic class MixerStateDWApplication extends DWAdapter\u003cMixerStateServiceConfiguration\u003e {\n    final static MixerStateService service = new MixerStateService();\n\n    /**\n    * Return the Dropwizard service you want to run.\n    */\n    public Service getSingletonService(){\n         return service;\n    }\n\n    /**\n    * Return the File where the configuration lives.\n    */\n    @Override\n    public File getConfigurationFile() {\n\n        URL url = Resources.getResource(\"mixer-state-server.yml\");\n        try {\n            return new File(url.toURI());\n        } catch (URISyntaxException e) {\n            throw new IllegalStateException(e);\n        }\n    }\n}\n```\n\n\nCreate a main/webapp/WEB-INF/web.xml file:\n------------------------------------------\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cweb-app\u003e\n    \u003c!--- This listener is required to hook in to the lifecycle of the WAR --\u003e\n    \u003clistener\u003e\n        \u003clistener-class\u003ecom.twilio.mixerstate.MixerStateDWApplication\u003c/listener-class\u003e\n    \u003c/listener\u003e\n\u003c/web-app\u003e\n```\n\nMake sure you also build a WAR artifact\n---------------------------------------------\n\nThere are two alternatives to building a war:\n\n### a. Add instructions to also build a WAR\n\nThis goes in `\u003cbuild\u003e\u003cplugins\u003e` section:\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n    \u003cartifactId\u003emaven-war-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e2.4\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003edefault-war\u003c/id\u003e\n            \u003cphase\u003epackage\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003ewar\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n    \u003cconfiguration\u003e\n        \u003cwebappDirectory\u003etarget/webapp\u003c/webappDirectory\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n### b. Change packaging of your Dropwizard service\n\nIf you do not intend to run the Dropwizard service standalone, you can simply\nchange the \"packaging\" element in pom.xml to be \"war\" instead of \"jar\".\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwilio%2Fwiztowar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwilio%2Fwiztowar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwilio%2Fwiztowar/lists"}