2012/8/30 Knute Snortum <ksnor...@catalystitservices.com>: > See below: > >> -----Original Message----- >> From: Knute Snortum [mailto:ksnor...@catalystitservices.com] >> Sent: Wednesday, August 29, 2012 3:05 PM >> To: Tomcat Users List >> Subject: RE: tomcat7-maven-plugin doesn't understand Maven filtering of >> context files? >> >> >> >> > -----Original Message----- >> > From: Olivier Lamy [mailto:ol...@apache.org] >> > Sent: Wednesday, August 29, 2012 9:32 AM >> > To: Tomcat Users List >> > Subject: Re: tomcat7-maven-plugin doesn't understand Maven filtering >> > of context files? >> >> [section deleted] >> >> > > >> > >> What cli are you using ? >> > > >> > > If I understand you, it's this: >> > > >> > > mvn clean install tomcat:run -P development >> > > >> > > I'm making that up because it's actually run from an Eclipse form. >> > When I run that from the command line in the project folder, I get the >> > same results so I think it's right... >> > > >> > > I just noticed that the CLI should be: >> > > >> > > mvn clean install tomcat7:run -P development >> > > >> > > ...with "tomcat7" not "tomcat". This gives me the Tomcat 2.0-beta-1 >> > version that we were excepting. I also notice the debug flag (-e?) >> > and that gives me a ton of info. Should I repost the output, or some >> of it? >> > Add as an attachment? >> > Regarding the flag have a look at what mvn -h says :-) (-X is for full >> > debug trace) >> > > >> > Maybe in a jira issue yes but not sure that will help >> > >> BTW do you have any sample project to reproduce your issue ? >> > > >> > > It would be complex to do this, but I'm going to try. I'm not sure >> > how I would post that. >> > Just share a project via bitbucket or github. > > Is there anything else I should do? I don't want to report this as a bug if > it's working as designed. But I was hoping I wouldn't have to setup my own, > private Tomcat server to do development.
Thanks for the project that helps me to understand your problem :-) The filtering here is done by the maven-war-plugin so the tomcat7 doesn't have any idea of that ! The plugin use warSourceDirectory http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/run-mojo.html#warSourceDirectory So by default web.xml is src/main/webapp/WEB-INF/web.xml and the file is not filtered In your case you can add <warSourceDirectory>${project.build.directory}/${project.artifactId}-${project.version}</warSourceDirectory> to the tomcat7 plugin configuration and run: mvn clean install tomcat7:run and it looks it works no more debug mode and it will use the filtered file. HTH > >> I created a test project in Github: >> >> https://github.com/ksnortum/Tomcat7MavenPluginTester >> >> It demonstrates what I believe is a bug in tomcat7-maven-plugin. The >> Tomcat server that is created does not use the configuration files >> (e.g.: web.xml) in the war file or the war directory that is created. >> It uses the "project" files, that is, the ones in src/main/webapp/WEB- >> INF. If you use Maven web resource filtering, the war file is changed >> but the "project" file isn't. This is correct. But if tomcat7-maven- >> plugin doesn't use the war configuration files, then how can you >> properly test the war file? >> >> >> > > >> > > -------------------------------------------------------------------- >> > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> > > For additional commands, e-mail: users-h...@tomcat.apache.org >> > > >> > >> > >> > >> > -- >> > Olivier Lamy >> > Talend: http://coders.talend.com >> > http://twitter.com/olamy | http://linkedin.com/in/olamy >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> > For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org