Ah, but the filters file *is* filtered. At least for Java System properties and for other filter tokens, and (because of the order that the filtering mechanism is implemented) also for values of simple POM elements (but not POM properties as they are complex).
In order to allow replacement of POM porperties to filter files in the same way as the others are replaced I have rasied the following JIRA and supplied a patch. http://jira.codehaus.org/browse/MRESOURCES-47 Its true, I could insert the POM properties directly into the resource files. But many of the tokens are compounded from one or more POM properties to produce understandable tokens instead of fragments. So it would either require many more properties to be added to each profile in my POM with much duplication between each profile, or it would require the use of many non-intuitive tokens fragments in the resource files. William -----Original Message----- From: Tim Kettler [mailto:[EMAIL PROTECTED] Sent: Friday, 24 August 2007 3:17 PM To: Maven Users List Subject: [***POSSIBLE SPAM***] - Re: [***POSSIBLE SPAM***] - Re: Accessing POM properties in a filter - Email has different SMTP TO: and MIME TO: fields in the email addresses - Email has different SMTP TO: and MIME TO: fields in the email addresses Hi, The probem is that for this to work the filters file would need to be filtered too, which is not the case. Use your declared properties directly in the resource files you want filtered and don't do the extra indirection via the filters file. -Tim William Ferguson schrieb: > ${myProp1} doesn't work either. > > > With a POM declaring > <myProp1>Somevalue</myprop1> > > A filter.file of > some.token=${myProp1} > > And a resource file with > Show.me.the.value.of.some.token=${some.token} > > > The resource file resolves to : > Show.me.the.value.of.some.token=${myProp1} > > Instead of > Show.me.the.value.of.some.token=SomeValue > > > William > > > -----Original Message----- > From: Eric Redmond [mailto:[EMAIL PROTECTED] > Sent: Friday, 24 August 2007 12:36 PM > To: Maven Users List > Subject: [***POSSIBLE SPAM***] - Re: Accessing POM properties in a > filter - Email has different SMTP TO: and MIME TO: fields in the email > addresses > > Why can't you just use ${myProp1} ? Why go through the trouble of > refering via "project.properties"? > > -- > Eric Redmond > http://blog.propellors.net > > On 8/23/07, William Ferguson <[EMAIL PROTECTED]> wrote: >> In a resource filter, I can specify tokens like: >> >> token1=${project.version} >> token2=${project.properties} >> >> Which when used in a resource file evaluates to: >> >> valueForToken1=1.0-SNAPSHOT >> valueForToken2={myProp1=value1, myProp2=value2} >> >> How do I specify a token in the resource filter that resolves to the >> value of myProp1? >> I've tried all variants (that I can think of) of >> ${project.properties.myProp1}. >> >> I'm sure there's a way, but I can't find documentation spelling out >> the syntax that is required. >> >> >> William >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]