IntelliJ: activate Maven profile when running Junit tests : <p>I have declared some properties that are specific to Maven profiles. A part of my pom.xml:</p>

<pre><code>&lt;profiles&gt;
            &lt;profile&gt;
                &lt;id&gt;release&lt;/id&gt;
                &lt;activation&gt;
                    &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
                &lt;/activation&gt;
                &lt;properties&gt;
                    &lt;my.properties.file&gt;foo.xml&lt;/my.properties.file&gt;
                &lt;/properties&gt;
            &lt;/profile&gt;
            &lt;profile&gt;
              &lt;id&gt;ci&lt;/id&gt;
              &lt;properties&gt;
                &lt;my.properties.file&gt;bar.xml&lt;/my.properties.file&gt;
              &lt;/properties&gt;
        &lt;/profile&gt;
&lt;/profiles&gt;
</code></pre>

<p>I encounter some problem to use the "ci" Maven profile when I start Junit tests via IntelliJ IDEA 2016.<br>
I activate my profile via the "Maven Projects" panel, then I start tests. The problem is the "my.properties.file" property value is equal to "foo.xml", not "bar.xml".</p>

<p>I have no problem with command-line (I can use the "-Pci" flag). How can I tell IntelliJ to use the "ci" profile? Thx.</p>
