I am working with selenium webdriver with maven and struggling. I have a set of maven profiles
<profiles>
<profile>
<id>demo</id>
<properties/>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
<properties/>
</profile>
</profiles>
My task is quite simple but i can't find a solution. How can i get and store into variable id of the current profile after i call for example mvn test -P prod? This id is needed later in tests.