I am trying to use the tomcat7-maven-plugin:run with a custom server.xml, which contains a Realm I need to enable. As described in the docs I have used <serverXml />
to point to my file. However, my application does not then get loaded. The plugin docs state that I need to configure the context for my application manually.
How do I do this? I am unsure what to put for the docBase etc.
Thanks.
I have configured custom server.xml with the reference taken from downloaded tomcat distribution and have updated port number and others, when I had issues followed below answer. embedded tomcat custom server.xml configuration issues Note:It is working only in tomcat7-maven-plugin artifact with version 2.1 but not 2.2
Find my pom.xml and server.xml
and Server.xml
Can you check this sample pom http://svn.apache.org/repos/asf/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/test/resources/deploy-war-project/pom.xml
If all you need is change the Realm then instead of using
server.xml
usecontext.xml
with your realm:Point your tomcat maven plugin to that
context.xml
: