You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matt Brozowski (JIRA)" <ji...@codehaus.org> on 2007/01/17 16:59:40 UTC
[jira] Created: (MRESOURCES-39) Filtering fails for command line
properties
Filtering fails for command line properties
-------------------------------------------
Key: MRESOURCES-39
URL: http://jira.codehaus.org/browse/MRESOURCES-39
Project: Maven 2.x Resources Plugin
Issue Type: Bug
Environment: maven-2.0.4 and maven-2.0.5
Mac OS X
Reporter: Matt Brozowski
Priority: Critical
Attachments: filtering-bug.tar
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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MRESOURCES-39) Filtering fails for
command line properties
Posted by "A (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124759 ]
avalon edited comment on MRESOURCES-39 at 2/23/08 10:17 AM:
-------------------------------------------------------
-Sorry I'm new to mvn... How can I use the patched plug-in? I've built it but couldn't find a way to make maven pick it up.-
Ah, it just needs to be in the local repo. How can I make sure it is used when put on a private repository?
Btw I don't think overwriting jvm default properties from POM is a big issue since that would be kind of hack and should be done on cmdline if needed.
Thanks for the patch and hope it will be included in next plug-in versions!
was (Author: avalon):
Sorry I'm new to mvn... How can I use the patched plug-in? I've built it but couldn't find a way to make maven pick it up.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> Priority: Critical
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "A (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124759 ]
A commented on MRESOURCES-39:
-----------------------------
Sorry I'm new to mvn... How can I use the patched plug-in? I've built it but couldn't find a way to make maven pick it up.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> Priority: Critical
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MRESOURCES-39) Filtering fails for
command line properties
Posted by "A (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124738 ]
avalon edited comment on MRESOURCES-39 at 2/23/08 9:41 AM:
------------------------------------------------------
-There was a propertyset in ANT where you can select only command-line options as a selector. I can't find Project and other classes' description in maven's Javadoc API so this is pure guess.-
I'll try the patch these days, thanks!
was (Author: avalon):
There was a propertyset in ANT where you can select only command-line options as a selector. I can't find Project and other classes' description in maven's Javadoc API so this is pure guess.
I'll try the patch these days, thanks!
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> Priority: Critical
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRESOURCES-39) Filtering fails for command line properties
Posted by "Brian Chapman (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313342#comment-313342 ]
Brian Chapman commented on MRESOURCES-39:
-----------------------------------------
Version 2.6 re-fixes the issue.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: https://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier updated MRESOURCES-39:
--------------------------------
Attachment: maven-resources-plugin-prop-filtering-r630241.patch
The problem seems to be that the resources plugin first adds all the system properties to it's properties object, then adds properties from project.getProperties(). So the project properties override the system properties.
The patch reverses this order, and changes one test case to reflect this change. The only problem I see is if you wanted to override some default system property (for example "user.home") in your pom, you wouldn't be able to do this anymore. I didn't find any easy way to get just the command line props from within the plugin, but if this was possible it would probably be a better solution.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> Priority: Critical
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MRESOURCES-39:
----------------------------------------
Affects Version/s: 2.2
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x 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
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "A (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124738 ]
A commented on MRESOURCES-39:
-----------------------------
There was a propertyset in ANT where you can select only command-line options as a selector. I can't find Project and other classes' description in maven's Javadoc API so this is pure guess.
I'll try the patch these days, thanks!
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> Priority: Critical
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy closed MRESOURCES-39.
----------------------------------
Resolution: Fixed
it added in rev [692758|http://svn.apache.org/viewvc?rev=692758&view=rev]
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147190#action_147190 ]
Olivier Lamy commented on MRESOURCES-39:
----------------------------------------
As the plugin now use the maven filtering component, this should be fixed.
Have a look at the order defined here http://maven.apache.org/shared/maven-filtering.
Can you try it a snapshot has deployed.
I leave this issue open until a it has been written for this.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x 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
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MRESOURCES-39) Filtering fails for command line properties
Posted by "Eric Miller (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=292562#comment-292562 ]
Eric Miller commented on MRESOURCES-39:
---------------------------------------
Not sure where this issue is. I was using 2.5, but command line property overrides do not work in that version. It works in version 2.4.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: https://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "jimmy kemp (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100507 ]
jimmy kemp commented on MRESOURCES-39:
--------------------------------------
No patches supplied - but a workaround.
It seems maven requires a filter and testfilter property file to exist under the default directory 'src/test//filters/testfilter.properties' and then defined in your pom.
command line parameters then override all other types of parameters set elsewhere.
e.g.
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<filters>
<filter>src/main/filters/filter.properties</filter>
<filter>
src/test/filters/testfilter.properties
</filter>
</filters>
</build>
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> Priority: Critical
> Attachments: filtering-bug.tar
>
>
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy updated MRESOURCES-39:
-----------------------------------
Fix Version/s: 2.3
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Basil James Whitehouse III (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138752#action_138752 ]
Basil James Whitehouse III commented on MRESOURCES-39:
------------------------------------------------------
Could someone with privileges mark this as affecting version 2.2 of the resources plugin to make it a bit easier for others to find.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MRESOURCES-39) Filtering fails for command line
properties
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=133409#action_133409 ]
Benjamin Bentmann commented on MRESOURCES-39:
---------------------------------------------
We should have Milos or somebody with similiar skills in embedded development review this issue. I doubt that directly using the system properties is the correct approach. IIRC, there were execution properties from {{MavenSession}} that should be used instead.
> Filtering fails for command line properties
> -------------------------------------------
>
> Key: MRESOURCES-39
> URL: http://jira.codehaus.org/browse/MRESOURCES-39
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Environment: maven-2.0.4 and maven-2.0.5
> Mac OS X
> Reporter: Matt Brozowski
> 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 filtered.properties file in src/main/filtered/filtered.properties. I have also included a test that gets passed the filtered property as a System property via the surefire plugin. It then loaded the filtered.properties 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 is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira