{"id":19398701,"url":"https://github.com/arquillian/arquillian-container-tomcat","last_synced_at":"2026-01-23T15:14:52.774Z","repository":{"id":37548434,"uuid":"1529680","full_name":"arquillian/arquillian-container-tomcat","owner":"arquillian","description":"Arquillian Containers for Tomcat","archived":false,"fork":false,"pushed_at":"2025-03-27T08:50:46.000Z","size":1046,"stargazers_count":25,"open_issues_count":10,"forks_count":37,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-29T13:06:54.919Z","etag":null,"topics":["arquillian","tomcat"],"latest_commit_sha":null,"homepage":"https://arquillian.org","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/arquillian.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-03-26T16:22:35.000Z","updated_at":"2025-03-10T09:52:21.000Z","dependencies_parsed_at":"2024-04-10T08:32:06.556Z","dependency_job_id":"be5ecc48-608a-458a-8768-000d42597d20","html_url":"https://github.com/arquillian/arquillian-container-tomcat","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arquillian%2Farquillian-container-tomcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arquillian%2Farquillian-container-tomcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arquillian%2Farquillian-container-tomcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arquillian%2Farquillian-container-tomcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arquillian","download_url":"https://codeload.github.com/arquillian/arquillian-container-tomcat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345850,"owners_count":20924102,"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":["arquillian","tomcat"],"created_at":"2024-11-10T11:06:50.943Z","updated_at":"2026-01-23T15:14:52.755Z","avatar_url":"https://github.com/arquillian.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":":toc:\n:toclevels: 1\n\n= Arquillian - Tomcat Containers image:https://github.com/arquillian/arquillian-container-tomcat/actions/workflows/maven.yml/badge.svg[GH Actions Build Status,link=https://github.com/arquillian/arquillian-container-tomcat/actions/workflows/maven.yml?query=branch%3Amain]\n\n// Editor notes:\n// Keep each sentence on a separate line for best experience with SCM.\n// TODO review the order of the sections, should perhaps be ordered by frequency of usage: managed, remote, embedded\n// TODO the versions are now expressions, perhaps we can do something smarter to keep it up to date with pom.xml?\n// TODO lets add a better example so that people can just copy and paste the sections, e.g. one where the tomcat is downloaded from URL\n\nArquillian Container Tomcat project provides `DeployableContainer` implementations for managing the lifecycle of Tomcat\ninstances within Arquillian tests.\nIt supports Jakarta EE features like JNDI and Servlet,\nenabling seamless deployment and testing of web applications.\nThere three distinct operation modes:\n\n* Embedded: Runs within the same JVM as the test cases.\n* Managed: Operates in a separate JVM, with Arquillian managing its lifecycle.\n* Remote: Connects to an already running Tomcat instance.\n\nEach configuration has its specific setup and considerations and\nare outlined below to help users integrate Tomcat into their testing workflows.\n\n== Tomcat Embedded\n\nA `DeployableContainer` implementation that manages the complete lifecycle of an embedded (same JVM) Tomcat Servlet Container.\nKeep in mind that only select Jakarta EE APIs are available in Tomcat, such as JNDI and Servlet 3.0.\nTest archives are adapted to Tomcat's `StandardContext` API by ShrinkWrap and deployed programmatically.\n\n=== Container Injection Support Matrix\n\n|===\n|@Resource |@EJB |@Inject |@PersistenceContext / @PersistenceUnit\n|✓         |     |✓       |\n|===\n\n____\n\nWARNING: CDI support requires use of Weld Servlet and associated configuration.\nThe WAR will have to be unpacked as well in order for Weld to locate the classes. See the following configuration example.\n\n____\n\n=== Configuration Example\n\n[source,xml]\n----\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?\u003e\n\u003carquillian xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://jboss.org/schema/arquillian\"\n            xsi:schemaLocation=\"http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd\"\u003e\n\n    \u003ccontainer qualifier=\"tomcat\" default=\"true\"\u003e\n        \u003cconfiguration\u003e\n            \u003cproperty name=\"unpackArchive\"\u003etrue\u003c/property\u003e\n        \u003c/configuration\u003e\n    \u003c/container\u003e\n\u003c/arquillian\u003e\n----\n\n=== Configuration\n\n*Default Protocol:* Servlet 6.0\n\n==== Container Configuration Options\n\n|===\n|Name |Type |Default |Description \n\n|`bindHttpPort` |`int` |`8080` |The HTTP port the server should bind to.\n|`bindAddress` |`String` |`localhost` |The host the server should be run on.\n|`tomcatHome` |`String` | |Optional location of a Tomcat installation to link against.\n|`serverName` |`String` |`arquillian-tomcat-embedded-10` |Optional name of the server.\n|`appBase` |`String` |`webapps` |Optional relative or absolute path to the directory where applications are deployed (e.g., webapps).\n|`workDir` |`String` | |Optional relative or absolute path to the directory where applications are expanded and session serialization data is stored (e.g., work).\n|`unpackArchive` |`boolean` |`false` |Specify if the deployment should be deployed exploded or compressed.\n|===\n\n=== Example of Maven Profile Setup\n\n// TODO review the dependency set below\n\n[source,xml]\n----\n\u003cprofile\u003e\n    \u003cid\u003etomcat-embedded\u003c/id\u003e\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.jboss.arquillian.container\u003c/groupId\u003e\n            \u003cartifactId\u003earquillian-tomcat-embedded-10\u003c/artifactId\u003e\n            \u003cversion\u003e${version.arquillian.container.tomcat}\u003c/version\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.apache.tomcat.embed\u003c/groupId\u003e\n            \u003cartifactId\u003etomcat-embed-core\u003c/artifactId\u003e\n            \u003cversion\u003e${version.tomcat}\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.apache.tomcat.embed\u003c/groupId\u003e\n            \u003cartifactId\u003etomcat-embed-jasper\u003c/artifactId\u003e\n            \u003cversion\u003e${version.tomcat}\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.apache.tomcat.embed\u003c/groupId\u003e\n            \u003cartifactId\u003etomcat-embed-logging-juli\u003c/artifactId\u003e\n            \u003cversion\u003e${version.tomcat}\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.eclipse.jdt.core.compiler\u003c/groupId\u003e\n            \u003cartifactId\u003eecj\u003c/artifactId\u003e\n            \u003cversion\u003e3.7\u003c/version\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003c!-- Weld servlet for testing CDI injections --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.jboss.weld.servlet\u003c/groupId\u003e\n            \u003cartifactId\u003eweld-servlet\u003c/artifactId\u003e\n            \u003cversion\u003e5.1.5.Final\u003c/version\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/profile\u003e\n----\n\n== Tomcat Managed\n\nA `DeployableContainer` implementation that can run and connect to remote (different JVM, but same machine) Tomcat instances.\nThis implementation has lifecycle support, so the container will be started and stopped as part of the test run.\n\n=== Container Injection Support Matrix\n\n|===\n|@Resource |@EJB |@Inject |@PersistenceContext @PersistenceUnit\n|✓         |     |✓       |\n|===\n\n=== Configuration\n\n*Default Protocol:* Servlet 6.0\n\n=== Container Configuration Options\n\n|===\n|Name |Type |Default |Description\n\n|`bindHttpPort` |`int` |`8080` |The HTTP port the server will run on, has to be the same as in `$CATALINA_HOME/conf/server.xml`.\n|`bindAddress` |`String` |`localhost` |The host the server will run on, has to be the same as in `$CATALINA_HOME/conf/server.xml`.\n|`catalinaHome` |`String` |`$CATALINA_HOME` |The Tomcat configuration to start.\n|`javaHome` |`String` |`$JAVA_HOME` |The Java runtime to use to start the server.\n|`javaVmArguments` |`String` |`-Xmx512m` |JVM arguments used to start the server.\n|`user` |`String` | |Username of the user who has `manager-script` role. It is set in `$CATALINA_HOME/conf/tomcat-users.xml`.\n|`pass` |`String` | |Password of the user who has `manager-script` role. It is set in `$CATALINA_HOME/conf/tomcat-users.xml`.\n|`jmxPort` |`int` |`8089` |The JMX port used to connect to the running instance, needed for deployment introspection.\n|`urlCharset` |`String` |`ISO-8859-1` |Charset of URL used for deploy/undeploy operations.\n|`outputToConsole` |`boolean` |`true` |Should the server startup console log be piped to the console.\n|`startupTimeoutInSeconds` |`int` |`120` |Time to wait before throwing an exception on server startup.\n|`serverConfig` |`String` |`server.xml` |Which server configuration file to startup with.\n|===\n\n=== Example of Maven profile setup\n\n[source,xml]\n----\n\u003cprofile\u003e\n    \u003cid\u003etomcat-managed\u003c/id\u003e\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.jboss.arquillian.container\u003c/groupId\u003e\n            \u003cartifactId\u003earquillian-tomcat-managed-10\u003c/artifactId\u003e\n            \u003cversion\u003e${version.arquillian.container.tomcat}\u003c/version\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/profile\u003e\n----\n\n== Tomcat Remote\n\nA `DeployableContainer` implementation that can connect to a remote Tomcat Servlet Container instance.\n\n=== Container Injection Support Matrix\n\n|===\n|@Resource |@EJB |@Inject |@PersistenceContext @PersistenceUnit\n|✓         |     |✓       |\n|===\n\nWARNING: CDI support requires the use of Weld Servlet and associated configuration.\n\n=== Configuration\n\n*Default Protocol:* Servlet 6.0\n\n=== Container Configuration Options\n\n|===\n|Name |Type |Default |Description \n\n|`httpPort` |`int` |`8080` |The HTTP port the server is bound to.\n|`host` |`String` |`localhost` |The host the server is running on.\n|`user` |`String` | |The user to authenticate as when using the Management console.\n|`pass` |`String` | |The password to authenticate with when using the Management console.\n|`jmxPort` |`int` |`8089` |The JMX port used to connect to the running instance, needed for deployment introspection.\n|===\n\n=== Example of Maven Profile Setup\n\n[source,xml]\n----\n\u003cprofile\u003e\n    \u003cid\u003etomcat-remote\u003c/id\u003e\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.jboss.arquillian.container\u003c/groupId\u003e\n            \u003cartifactId\u003earquillian-tomcat-remote-10\u003c/artifactId\u003e\n            \u003cversion\u003e${version.arquillian.container.tomcat}\u003c/version\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/profile\u003e\n----\n\nWARNING: The remote Tomcat instance has to expose a remote JMX `MBeanConnection`.\nThis can be done by adding the following to the startup script.\n\n==== Linux example - `startup.sh`\n\n[source,bash]\n----\nJAVA_OPTS=\"$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8089\"\nJAVA_OPTS=\"$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false\"\nJAVA_OPTS=\"$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false\"\n----\n\nNOTE: This makes your Tomcat insecure!\nUse only for testing and development purposes.\n\n// These were rewritten but originally available at these URLs:\n// https://docs.jboss.org/author/display/ARQ/Tomcat%207.0%20-%20Embedded.html\n// https://docs.jboss.org/author/display/ARQ/Tomcat%207.0%20-%20Managed.html\n// https://docs.jboss.org/author/display/ARQ/Tomcat%207.0%20-%20Remote.html\n\n== Contributing\n\nSee the link:CONTRIBUTING.adoc[contributing guide].\n\n== Releasing\n\nReleasing the project requires permission to deploy to Maven Central see https://central.sonatype.org/publish/requirements/[Maven Central Release Requirements].\nOnce everything is set up, you simply need to run the `./release.sh` script with at least the two required parameters:\n\n1. `-r` or `--release` which is the version you want to release\n2. `-d` or `--development` which is the next development version.\n\nBy default, the release version cannot contain `SNAPSHOT` and the development version, must contain `SNAPSHOT`.\n\n[source,bash]\n----\n./release.sh --release 1.2.4.Final --development 1.2.5.Final-SNAPSHOT --notes-start-tag 1.2.3.Final --dry-run\n----\n\n=== Supported Arguments\n\n|===\n|Argument | Requires Value | Description\n\n| `-d`, `--development`\n| Yes\n| The next version for the development cycle.\n\n| `-f`, `--force`\n| No\n| Forces to allow a SNAPSHOT suffix in release version and not require one for the development version.\n\n| `-h`, `--help`\n| N/A\n| Displays this help\n\n| `--notes-start-tag`\n| Unused\n| Passes the `--notes-from-tag` and the argument to the `gh create release` command.\n\n| `-p`, `--prerelease`\n| Unused\n| Passes the `--prerelease` to the `gh create release` command.\n\n| `-r`, `--release`\n| Yes\n| The version to be released. Also used for the tag.\n\n| `--dry-run`\n| No\n| Executes the release in as a dry-run. Nothing will be updated or pushed.\n\n| `-v`, `--verbose`\n| No\n| Prints verbose output.\n\n|===\n\nAny additional arguments are considered arguments for the Maven command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farquillian%2Farquillian-container-tomcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farquillian%2Farquillian-container-tomcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farquillian%2Farquillian-container-tomcat/lists"}