Maven Shared Components

Create a common component for files filtering

Details

  • Number of attachments :
    0

Description

Currently we have some duplicated code in some plugins for filtering.
This means some plugins use a different logic.
This component will a common filtering logic for all plugins.

Issue Links

Activity

Hide
Olivier Lamy added a comment -

job started on rev 614750.

Show
Olivier Lamy added a comment - job started on rev 614750.
Hide
Barend Garvelink added a comment -

I think this is an important improvement. Maven's filtering support is rather limited at the moment (compared to ant) and a centralized component would make it a lot easier to gain some ground. Some of the features I'd (eventually) like to say:

  • Don't constrain placeholders to {{${..}}} syntax, it's a good default but you need to allow any literal to solve some edge cases, for instance, to filter a property where the unfiltered value has to be meaningful, e.g. in an deployment descriptor that's also interpreted by an IDE.
  • To allow XPath-like expressions in the replacement value, e.g. it'd be mighty useful to allow something like {{xpath:/project/dependencies/dependency[artifactId='commons-logging']/version}} as a replacement value.
Show
Barend Garvelink added a comment - I think this is an important improvement. Maven's filtering support is rather limited at the moment (compared to ant) and a centralized component would make it a lot easier to gain some ground. Some of the features I'd (eventually) like to say:
  • Don't constrain placeholders to {{${..}}} syntax, it's a good default but you need to allow any literal to solve some edge cases, for instance, to filter a property where the unfiltered value has to be meaningful, e.g. in an deployment descriptor that's also interpreted by an IDE.
  • To allow XPath-like expressions in the replacement value, e.g. it'd be mighty useful to allow something like {{xpath:/project/dependencies/dependency[artifactId='commons-logging']/version}} as a replacement value.
Hide
François Wauquier added a comment -

Have found this wiki page that explain the (new ?) filtering rules:
http://docs.codehaus.org/display/MAVEN/Resources+Handling+(common+component+maven-filtering)

which is different than official documentation:
http://maven.apache.org/shared/maven-filtering/

I have understand that:
@..@ are replaced based on filters property file
${...} are replaced based on maven variable/property

In my case, i do filtering in ant xml files with the assembly plugin, and the variables/properties int an ant file are are marked with ${}, but i want to distinguish the maven filtering variable/property from the ant variable/property.

I wanted to use @..@ in my ant xml files, but that does'nt work anymore.(only variable from the filer property file are used)

So I share the first feature envy of Barned Garvelink., I would like to have the possibilty to configure the tokens.

I use
Maven 2.1.0
assembly 2.2-beta-3

Show
François Wauquier added a comment - Have found this wiki page that explain the (new ?) filtering rules: http://docs.codehaus.org/display/MAVEN/Resources+Handling+(common+component+maven-filtering) which is different than official documentation: http://maven.apache.org/shared/maven-filtering/ I have understand that: @..@ are replaced based on filters property file ${...} are replaced based on maven variable/property In my case, i do filtering in ant xml files with the assembly plugin, and the variables/properties int an ant file are are marked with ${}, but i want to distinguish the maven filtering variable/property from the ant variable/property. I wanted to use @..@ in my ant xml files, but that does'nt work anymore.(only variable from the filer property file are used) So I share the first feature envy of Barned Garvelink., I would like to have the possibilty to configure the tokens. I use Maven 2.1.0 assembly 2.2-beta-3
Hide
François Wauquier added a comment -

same with assembly 2.2-beta-4

Show
François Wauquier added a comment - same with assembly 2.2-beta-4
Hide
Olivier Lamy added a comment -

please do not add comments on a closed issue !!
If you have questions please use the user mailing list .

Show
Olivier Lamy added a comment - please do not add comments on a closed issue !! If you have questions please use the user mailing list .

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: