How to pass build parameters in TeamCity (Maven Surefire plugin)

Hi! I`m using Surefire plugin and set systemPropertyVariable - <browser>, here is the code:


In TeamCity (Build Configuration Settings, menu Parameters) I define System Properties parameter:

But build was not successful. There is a NullPointerException.

In the same time, I can easily run build using Command Line: mvn test –D browser=firefox

Please, help! How can I pass parameters to my build?
Good day!

1 comment
Comment actions Permalink


TeamCity's system properties can be resolved using common syntax ${propertyName} in pom.xml files.
If you need to pass additional commandline parameters to Maven process, please use "Additional Maven command line parameters" field in Maven build step settings.


Please sign in to leave a comment.