Hello all,

I want to supply an alternate context.xml when running the goal tomcat:run.
This alternate context.xml has servlet init parameter overrides for testing
on localhost (vs. the normal build which will have production settings.)

I've setup the plugin in my pom as follows:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>tomcat-maven-plugin</artifactId>
  <version>1.1</version>
  <configuration>
    <path>/myapp</path>
   
<contextFile>${basedir}/src/test/resources/tomcat-context.xml</contextFile>
  </configuration>
</plugin>

And the alternate context as follows:

<Context>
    <Parameter name="config-file-name" value="/test-cache-location.conf"
override="true"/>
    <Parameter name="contextConfigLocation"
value="/WEB-INF/spring-context-test.xml" override="true"/>
</Context>

When I start the tomcat:run goal, through logging, I can see the embedded
tomcat finding and reading the alternate context.xml, but then is ignored
when the context is initialized (the parameters i want overridden still
contain their original values from the web.xml.)

Has anyone ever tried this/see this before? Any ideas of how I can supply
the alternate context.xml file and have it actually used in the run goal?

Thanks!
~t
-- 
View this message in context: 
http://old.nabble.com/Problem-supplying-alternat-context.xml-in-maven-tomcat-plugin-tp31483091p31483091.html
Sent from the mojo - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to