Reputation: 1164
I need to setup some environment variables in my test classes and I don't want to pass them to Maven with -D
flag every time. Is there a way to setup these environment variables in pom.xml
file only for tests?
I've tried to setup them with System.getenv().put()
but without success (java.lang.UnsupportedOperationException
)
Upvotes: 0
Views: 1310
Reputation: 927
Most maven plugins seem to support the configuration element. This should explain what you need Configuring surefire plugin
Upvotes: 1