You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Fallows <jo...@gmail.com> on 2005/07/08 23:39:50 UTC

[m2] Filtered resources and the POM

I noticed that the latest code on the trunk adds support for filtered
resources, including the ability to refer to pom properties, in
addition to any filter properties defined in filter.properties.

For example:

  src/main/resources/my-resource.txt

with contents

  ${version}

It seems that each property of the POM is exposed as an independent
top-level variable.

I was expecting the filtered resource file syntax to be...

  ${project.version}

...since that would be consistent with expressions used in the pom.xml
file, such as:

  <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>

This would also seem to have the added benefit of reduced collision
space for top-level variables in filtered resource files.

Would it be reasonable to change the trunk to use the ${project.*}
syntax for filtered resources?  Maybe it works this way already and I
just misread the code.

Let me know if I should file an issue or not on JIRA.

Kind Regards,
John Fallows.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Filtered resources and the POM

Posted by Brett Porter <br...@gmail.com>.
I thought both worked (and pom. too).

Whatever it is it should definitely be consistent, so if that isn't
the case, a bug it is.

- Brett

On 7/9/05, John Fallows <jo...@gmail.com> wrote:
> I noticed that the latest code on the trunk adds support for filtered
> resources, including the ability to refer to pom properties, in
> addition to any filter properties defined in filter.properties.
> 
> For example:
> 
>   src/main/resources/my-resource.txt
> 
> with contents
> 
>   ${version}
> 
> It seems that each property of the POM is exposed as an independent
> top-level variable.
> 
> I was expecting the filtered resource file syntax to be...
> 
>   ${project.version}
> 
> ...since that would be consistent with expressions used in the pom.xml
> file, such as:
> 
>   <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
> 
> This would also seem to have the added benefit of reduced collision
> space for top-level variables in filtered resource files.
> 
> Would it be reasonable to change the trunk to use the ${project.*}
> syntax for filtered resources?  Maybe it works this way already and I
> just misread the code.
> 
> Let me know if I should file an issue or not on JIRA.
> 
> Kind Regards,
> John Fallows.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org