title: Force the use of an alternate POM file in eclipse
body: <p>In my maven project I usually use the POM file named <em>pom.xml</em>. I have a second POM file though (call it <em>pom_alt.xml</em>), which I occasionally use to perform a very different build of the same project. To do so I specify the <code>-f</code> option in the command line</p>
  
  <pre><code>mvn clean package -fpom_alt.xml
  </code></pre>
  
  <p>as suggested by <code>man mvn</code>: </p>
  
  <pre><code>   -f,--file
            Force the use of an alternate POM file.
  </code></pre>
  
  <p>Now, when I am coding in eclipse I usually need maven to use <em>pom.xml</em>, but sometimes I should code or debug while the other file <em>pom_alt.xml</em> is used instead. Is there a way to tell the eclipse maven integration to use that file? Currently I am temporarily copy-pasting from <em>pom_alt.xml</em> to <em>pom.xml</em> since I seldom happen to need that, but you can see that's not optimal.</p>
  
  <p>I am with Eclipse IDE for Java EE Developers, Mars Release 4.5.0.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I could build from the command line or use <em>Run As Maven build</em> as in
  <a href="https://stackoverflow.com/a/37286742/2754507">Carlos Andres' solution</a>, but ideally I would like to define a persistent setting, like a property or preference. This because I find nice if the POM file can be fixed while I am doing things like running as Java Application and test cases, or executing on a server. Processes that require a project clean or server restart are often triggering a maven build with the default POM.</p>