To use a managed Tomcat 7 together with Arquillian you need to replace the original tomcat-users.xml
with a custom one, like this one here:
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-jmx"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat"
roles="manager-script, manager-jmx, manager-gui"/>
<user username="masterofdesaster" password="letmein"
roles="manager-script"/>
</tomcat-users>
Important for the setup is the second to last line there I defined the user masterofdesaster
with his own password.
Furthermore you must configure Arquillian via arquillian.xml
. My one looks like this and uses the user masterofdesaster
to perform the deployment during my tests:
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<container qualifier="tomcat7" default="true">
<configuration>
<property name="catalinaHome">/path/to/tomcat7</property>
<property name="jmxPort">8089</property>
<property name="bindHttpPort">8080</property>
<property name="user">masterofdesaster</property>
<property name="pass">letmein</property>
<property name="serverConfig">server.xml</property>
</configuration>
</container>
</arquillian>