title: Get list of activated profile name during run time in maven java project
body: <p>I need to be able to use the profile activated during the run time of JUnit tests.
  I was wondering if there is any way of doing something like:</p>
  
  <pre><code>String str = System.getProperty("activated.profile[0]");
  </code></pre>
  
  <p>Or any other relative way...</p>
  
  <p>I realized there is an option to use <code>${project.profiles[0].id}</code> bu somehow it's not working.</p>
  
  <p>Any ideas?</p>