maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepak Abraham (JIRA)" <>
Subject [jira] (MRESOURCES-39) Filtering fails for command line properties
Date Fri, 25 Jul 2014 09:35:11 GMT


Deepak Abraham commented on MRESOURCES-39:

doesn't work in version 2.6 resources plugin

If I specify a property like so in the pom.xml:


I am using this property to specfiy a folder name in the filter property:


Then I am unable to override this property value through the command prompt, i.e., mvn install does not work as expected. '' is still local instead of dev.

> Filtering fails for command line properties
> -------------------------------------------
>                 Key: MRESOURCES-39
>                 URL:
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2
>         Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
>            Reporter: Matt Brozowski
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 2.3
>         Attachments: filtering-bug.tar, maven-resources-plugin-prop-filtering-r630241.patch
> When passing a property on the command line to maven using -D it does not properly override
values passed to filters.
> I have attached a sample project that defines a property in the pom.xml called 'filtered'
  This property is used as a filter in the file in src/main/filtered/
 I have also included a test that gets passed the filtered property as a System property via
the surefire plugin.  It then loaded the file and tests to ensure the
filters match.
> The tests pass when run as
> mvn test
> BUT if I run as 
> mvn -Dfiltered=from-cmd-line teset
> They fail.
> I have also included the antrun plugin print its perspective on the value of the property.

This message was sent by Atlassian JIRA

View raw message