Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 793E9D7B8 for ; Fri, 31 Aug 2012 17:41:43 +0000 (UTC) Received: (qmail 21410 invoked by uid 500); 31 Aug 2012 17:41:40 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 21358 invoked by uid 500); 31 Aug 2012 17:41:40 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 21348 invoked by uid 99); 31 Aug 2012 17:41:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2012 17:41:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kSnortum@catalystitservices.com designates 70.88.117.122 as permitted sender) Received: from [70.88.117.122] (HELO CORPEXCH01.catalystsolves.com) (70.88.117.122) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2012 17:41:34 +0000 Received: from CORPEXCH01.catalystsolves.com ([::1]) by CORPEXCH01.catalystsolves.com ([::1]) with mapi; Fri, 31 Aug 2012 13:41:26 -0400 From: Knute Snortum To: Tomcat Users List Subject: RE: tomcat7-maven-plugin doesn't understand Maven filtering of context files? Thread-Topic: tomcat7-maven-plugin doesn't understand Maven filtering of context files? Thread-Index: Ac2FQ3KwAbM5gULSQeKumiJUm0yKRwAQHzeAAAWHAEAADPM6gAALw9oAAAoXiYAAAwGP0AApe6vgADK/wYAAAMT5kA== Date: Fri, 31 Aug 2012 17:41:26 +0000 Message-ID: <860E78144996BA4886978AEDFF02CCAAC3226B@CORPEXCH01.catalystsolves.com> References: <860E78144996BA4886978AEDFF02CCAAC31C58@CORPEXCH01.catalystsolves.com> <860E78144996BA4886978AEDFF02CCAAC31F04@CORPEXCH01.catalystsolves.com> <860E78144996BA4886978AEDFF02CCAAC31FC2@CORPEXCH01.catalystsolves.com> <860E78144996BA4886978AEDFF02CCAAC320A1@CORPEXCH01.catalystsolves.com> <860E78144996BA4886978AEDFF02CCAAC32188@CORPEXCH01.catalystsolves.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 > -----Original Message----- > From: Olivier Lamy [mailto:olamy@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? >=20 > 2012/8/30 Knute Snortum : > > See below: > > > >> -----Original Message----- > >> From: Knute Snortum [mailto:kSnortum@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:olamy@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. >=20 > Thanks for the project that helps me to understand your problem :-) >=20 > 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 >=20 > So by default web.xml is src/main/webapp/WEB-INF/web.xml and the file is > not filtered >=20 > In your case you can add > ${project.build.directory}/${project.artifactId}- > ${project.version} > 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. >=20 > HTH That was it! You solved a problem that has been haunting me for about a mo= nth! Thank you. Just for your notes, the default directory for the Maven filtering plugin i= s ${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 in their POM. Thanks again! > -- > Olivier Lamy > Talend: http://coders.talend.com > http://twitter.com/olamy | http://linkedin.com/in/olamy >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org