title: Java: set pom.xml property
body: <p>I have Java <code>Meven</code> project and inside my <code>pom.xml</code> i have this <code>property</code>:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;suiteXmlFile&gt;testing.xml&lt;/suiteXmlFile&gt;
      &lt;JAVA_1_8_HOME&gt;C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe&lt;/JAVA_1_8_HOME&gt;
  &lt;/properties&gt;
  
  &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.8.0&lt;/version&gt;
      &lt;configuration&gt;
           &lt;fork&gt;true&lt;/fork&gt;
           &lt;executable&gt;${JAVA_1_8_HOME}&lt;/executable&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>So i case i am running my project from <code>Windows</code> i just type <code>mvn test</code></p>
  
  <p>In case i am with <code>MACOS/Linux</code> this path doesn't exist and i wonder what solutions can be found to fix this issue. </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>As suggestion here i add this profile:</p>
  
  <pre><code>&lt;profile&gt;
              &lt;id&gt;platform-windows&lt;/id&gt;
              &lt;activation&gt;
                  &lt;os&gt;
                      &lt;family&gt;windows&lt;/family&gt;
                  &lt;/os&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.8.0&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;fork&gt;true&lt;/fork&gt;
                              &lt;executable&gt;C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe&lt;/executable&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;mac&lt;/id&gt;
              &lt;activation&gt;
                  &lt;os&gt;
                      &lt;family&gt;mac&lt;/family&gt;
                  &lt;/os&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                          &lt;version&gt;3.8.0&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;fork&gt;true&lt;/fork&gt;
                              &lt;executable&gt;/usr/bin/javac&lt;/executable&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  </code></pre>
  
  <p>Now how my code will now to run this particular id ?</p>