> -----Original Message-----
> From: Olivier Lamy [mailto:ol...@apache.org]
> Sent: Friday, August 31, 2012 6:58 AM
> To: Tomcat Users List
> Subject: Re: tomcat7-maven-plugin doesn't understand Maven filtering of
> context files?
> 
> 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

That was it!  You solved a problem that has been haunting me for about a month! 
 Thank you.

Just for your notes, the default directory for the Maven filtering plugin is 
${project.build.directory}/${project.build.finalName}, and the final name 
defaults to ${project.artifactId}-${project.version}.  I say that in case you 
or anyone uses <build><finalName> in their POM.

Thanks again!

> --
> 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

Reply via email to