Re: How to override POM properties from CLI
Paul Gier wrote: This seems to work ok for me. I tried it locally and my profile properties override my pom properties, and cli props defined with -D override both pom and profile properties. I tried with maven 2.0.6 and 2.0.8. Can you attach a small zipped project to a jira issue that reproduces the problem? http://jira.codehaus.org/browse/MNG-3417 -- View this message in context: http://www.nabble.com/How-to-override-POM-properties-from-CLI-tp15344487s177p15633399.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to override POM properties from CLI
This seems to work ok for me. I tried it locally and my profile properties override my pom properties, and cli props defined with -D override both pom and profile properties. I tried with maven 2.0.6 and 2.0.8. Can you attach a small zipped project to a jira issue that reproduces the problem? Igor Romanov wrote: Thank you for reply. Are you saying that properties specified in POM can not be overridden with -D option? Igor Wayne Fay wrote: You should put the properties in different profiles, and then specify which profile using -Penv1 when running Maven. Wayne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to override POM properties from CLI
That's ugly! If one can't override properties then for example testing against different databases from an automated build system is a real pain. So first one needs to create profiles for all supported databases to be able to retrieve the jdbc driver. Then how many additional profiles for all combinations one needs? And then for developers' local runs? Please, anybody aware how to override pom properties? Wayne Fay wrote: You should put the properties in different profiles, and then specify which profile using -Penv1 when running Maven. Wayne -- View this message in context: http://www.nabble.com/How-to-override-POM-properties-from-CLI-tp15344487s177p15605671.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to override POM properties from CLI
I already noticed this problem and I think it is a bug. I don't know if an issue is open. Arnaud On Thu, Feb 21, 2008 at 7:43 AM, avalon [EMAIL PROTECTED] wrote: That's ugly! If one can't override properties then for example testing against different databases from an automated build system is a real pain. So first one needs to create profiles for all supported databases to be able to retrieve the jdbc driver. Then how many additional profiles for all combinations one needs? And then for developers' local runs? Please, anybody aware how to override pom properties? Wayne Fay wrote: You should put the properties in different profiles, and then specify which profile using -Penv1 when running Maven. Wayne -- View this message in context: http://www.nabble.com/How-to-override-POM-properties-from-CLI-tp15344487s177p15605671.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- .. Arnaud HERITIER .. OCTO Technology - aheritier AT octo DOT com www.octo.com | blog.octo.com .. ASF - aheritier AT apache DOT org www.apache.org | maven.apache.org ...
How to override POM properties from CLI
Hello, I have properties in a POM file I need to be able to override with command line –D option, to run build in a different environments. How can I do this? Simple example below doesn't work as I expect it should, i.e. test.txt will contain FALSE after running c:\temp\module mvn -Dtest.result=PASS process-test-resources What am I doing in a wrong way? Sample project: -- module/pom.xml ?xml version=1.0 encoding=UTF-8? project modelVersion4.0.0/modelVersion groupIdcom.test/groupId artifactIdtest/artifactId version1.0/version packagingjar/packaging properties test.resultFAIL/test.result /properties build testResources testResource directory${basedir}/src/test/resources/directory filteringtrue/filtering includes include*.txt/include /includes /testResource /testResources /build /project module/src/test/resources/test.txt This test ${test.result} -- Igor.
Re: How to override POM properties from CLI
You should put the properties in different profiles, and then specify which profile using -Penv1 when running Maven. Wayne On 2/7/08, Igor Romanov [EMAIL PROTECTED] wrote: Hello, I have properties in a POM file I need to be able to override with command line –D option, to run build in a different environments. How can I do this? Simple example below doesn't work as I expect it should, i.e. test.txt will contain FALSE after running c:\temp\module mvn -Dtest.result=PASS process-test-resources What am I doing in a wrong way? Sample project: -- module/pom.xml ?xml version=1.0 encoding=UTF-8? project modelVersion4.0.0/modelVersion groupIdcom.test/groupId artifactIdtest/artifactId version1.0/version packagingjar/packaging properties test.resultFAIL/test.result /properties build testResources testResource directory${basedir}/src/test/resources/directory filteringtrue/filtering includes include*.txt/include /includes /testResource /testResources /build /project module/src/test/resources/test.txt This test ${test.result} -- Igor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to override POM properties from CLI
Thank you for reply. Are you saying that properties specified in POM can not be overridden with -D option? Igor Wayne Fay wrote: You should put the properties in different profiles, and then specify which profile using -Penv1 when running Maven. Wayne -- View this message in context: http://www.nabble.com/How-to-override-POM-properties-from-CLI-tp15344487s177p15347745.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]