Passing System Properties and Environment Variables to unit tests in Maven – Update

Unfortunately there was an bug in my previous post.

I had naively assumed that the syntax for environment variables was the same as for system properties but alas not.

The correct code is:


    package
        <plugins>
        <plugin>
               org.apache.maven.plugins
               maven-surefire-plugin
               2.4.2
               
                   
                       some value
                   
                   
                       <property>
                           acceptance.test.host
                           ${acceptance.test.host}
                       </property>
                   
                
           </plugin>
       </plugins>

Share