0

I see we can pick a profile by maven command

mvn test -P testenv

How can override a property like - remote-webdriver I want to pass a URL for this. How can I do this with maven command

pom.xml contains below:

<profile>
            <id>testenv</id>
<properties>
                <test-id>1</test-id>
                <test-report>false</test-report>
                <testrail-close-testrun>false</testrail-close-testrun>
                <test-create>false</test-create>
                <environment-var>testenv</environment-var>
                <remote-webdriver>null</remote-webdriver>
            </properties>
        </profile>
Chaitanya
  • 3,590
  • 14
  • 33
Kpras
  • 163
  • 2
  • 2
  • 10
  • 2
    Does this answer your question? [How to override maven property in command line?](https://stackoverflow.com/questions/13876165/how-to-override-maven-property-in-command-line) – Ashhar Hasan Jan 24 '20 at 19:29
  • Though I am working with profiles, I see that solution is working by proving -D thanks! – Kpras Jan 24 '20 at 20:24
  • Just in case someone else stumbles onto this question, everything that's within a `` tag can be set using `-Dproperty=value`. Profile properties are no different. – Ashhar Hasan Jan 24 '20 at 20:26
  • Usually profiles are a smell in your build.... – khmarbaise Jan 25 '20 at 08:36

0 Answers0